cannot find symbol in Android Studio without rebuilding project

33,978

Solution 1

As a temporary workaround, try turning off Preferences > Compiler > Use External Build.

(as suggested in this issue: https://code.google.com/p/android/issues/detail?id=56884)

Solution 2

Clicking "Sync project with Gradle files" resolved this for me.

enter image description here

Solution 3

I used the following answer and it worked great:

https://stackoverflow.com/a/19223269/1531683

You can do "File" -> "Invalidate Caches...", and select "Invalidate and Restart" option to fix this.

Solution 4

Just Click Build -> Clean Project. It will solve the problem of missing "R.java".

Solution 5

Same here. Check this for updates: https://code.google.com/p/android/issues/detail?id=56884&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars

Share:
33,978
Adam Johns
Author by

Adam Johns

Software developer

Updated on October 13, 2020

Comments

  • Adam Johns
    Adam Johns over 3 years

    When I try to deploy my project to the emulator the compile fails with a bunch of Cannot find symbol errors. I have to rebuild the project then deploy everytime I make a change. This just started in 0.1.6 for me. Anyone else seeing this?