Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cannot find symbol in Android Studio without rebuilding project

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?

like image 534
Adam Johns Avatar asked Jun 21 '13 18:06

Adam Johns


4 Answers

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)

like image 78
Csongor Kiss Avatar answered Nov 12 '22 07:11

Csongor Kiss


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

enter image description here

like image 36
SK9 Avatar answered Nov 12 '22 07:11

SK9


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.

like image 6
sadegh saati Avatar answered Nov 12 '22 06:11

sadegh saati


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

like image 3
Muddassir Iqbal Avatar answered Nov 12 '22 06:11

Muddassir Iqbal