Reputation: 246
I have a problem with Android Studio that happened all of a sudden today when I opened AS. As you may see in the pictures, some files are strange. In this picture you may see that some of the .java files have different icon
And totally wrong content
Same thing happens with SOME of the XML files which have different content
Also some of the PNG images are not displayed in AS.
All files are ok, if for example I open them externally (notepad...) they are ok (luckily).
Is there a way to fix it?
I've already tried to invalidate cache/restart but it didnt work.
Thanks
Upvotes: 1
Views: 1017
Reputation: 2660
In fact this problem has been reported to the Android Studio team already.
A workaround would be to delete the caches folder of the Android Studio directory:
C:\Users\USERNAME\.AndroidStudio3.3\system\caches
This at least is the recommendation from the issue tracker and worked for me as well.
Upvotes: 1
Reputation: 246
So, it happened once again, but I've found a quick fix. I post it as an answer so people can easily spot it.
Quick fix:
Go to the folder "C:\Users\"your user"
Rename the folder ".AndroidStudio3.2" in ".AndroidStudio3.2backup"(name is example)
Launch Android Studio, It will not find configuration files, so it will ask you if you want to import them from the folder ".AndroidStudio3.2backup"
Click yes, few seconds and now you can delete the backup folder cause it will be created another ".AndroidStudio3.2" folder. Notice that I've renamed the original folder instead of delete it for security, and so to avoid to reconfigure Andoid Studio again, but you can choose to start a new configuration if you want.
Once launched Android Studio, click import (gradle...) and import your project.
Everything worked fine after this few seconds quick fix. Hope it helps.
Upvotes: 6
Reputation: 33
The same happened to me when I updated the libraries in gradle kotlin, etc. what I did was to download my project from my version manager and update the libraries one by one and prove the project works.
Upvotes: 0