Android Studio 0.4.2 was working fine and today I opened it and almost everything was red and the auto-completion had stopped working. I look at the imports and AS seems to
I got it solved by setting JDK. I got a pop up saying that Setup JDK when I placed mouse over the error.
I use shared preferences, but Android Studio complained about Editor symbol. Then, I added
import android.content.SharedPreferences.Editor;
and symbol is cool now.
I tried everything listed here. Then I checked my androidmanifest.xml I'd had some stoopid mismatched due to folder renames & package renames.
I had a similar problem when I rebuilt an aar file and replaced the older one in my project with the new one. I went through all the solutions here and none solved my issue. I later realised that minifyEnabled had been set to true in the library project which effectively removed a lot of dead code that was not being used in the library project.
My solution was to set minifyEnabled to false in the library project, assemble the aar, copied it into my project, invalidated caches and synced the grade project and everything worked fine.
Android Studio 1.3
I did nothing else and it worked for me.
None of these methods helped me in Android Studio 0.5.8.
My solution was to delete ~/.AndroidStudioPreview directory (in Ubuntu). Sorry, I have no idea where is it in other OS. This directory stores temporary files and Android Studio settings, so I missed all my settings. But it works!