how to overcome Android Studio cannot resolve symbol for android classes
AndroidAndroid StudioAndroid Problem Overview
I'v just installed Android Studio 0.8.2 for my first time and I have a lot of "Cannot resolve symbol" errors. The errors occur on both new projects and projects which were exported from eclipse.
JDK version: jdk1.8.0_11
Android studio errors:
Project's grade file
Android Solutions
Solution 1 - Android
You can do "File" -> "Invalidate Caches...", and select "Invalidate and Restart" option to fix this.
Solution 2 - Android
https://stackoverflow.com/questions/21100688/android-studio-suddenly-cannot-resolve-symbols helped:
> - Exit Android Studio > - Back up your project > - Delete all the .iml files and the .idea folder > - Relaunch Android Studio and reimport your project
Solution 3 - Android
In the menu bar
Select tools>-android>-SDK manager
and download the SDK build tools, SDK platform and Google API's( the Google API stores packages such as "import android.view.Menu" etc.) for the target SDK version of your project(20 as shown in your screenshot). if you are not sure which items you have to download , you can select all of them.(will take more time to download of course).
Restart the IDE
Solution 4 - Android
Delete folder: C:\Users\{your-user}\.AndroidStudio{your-version}\system\caches
It helped me
Solution 5 - Android
I cannot explain logic behind this one but it absolutely worked for me. For the symbol that is being shown in red or gives error of 'Cannot resolve', press backspace and type that particular symbol again.
Again, it's crazy but worked for me
Solution 6 - Android
Apparently the xml must be in the "drawable" folder. That fixed it for me.
Solution 7 - Android
I run into the same problem, i solved it by performing a clean project. To do this go to;
Select build>-clean project>
Solution 8 - Android
Did you install any plugins before this issue started occurring? I installed the CSVreader plug in and it took me forever to find out what the problem was. Look at the bottom right of the screen and see if there is a red dot. If it is there, click on it, it should list out lots of errors and above that it will say "uninstall plug in" next to the plug in that has the issue with it. click that, restart Android studio and your problem will be fixed (if a Plugin is the issue).