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?
-
1Someone from google mentioned: As a temporary workaround, try turning off Preferences > Compiler > Use External Build. – Adam Johns Jun 21 '13 at 20:43
-
2I seem to have new problems with every version of Android Studio. I realize it is in beta, but you would think a company as big as Google could do regression testing before deploying a new version. – kwahn Jun 25 '13 at 15:25
8 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)

- 715
- 6
- 11
-
14There is no "Use External Build" option in 0.3.1. I'm not sure which version removed it. – Oct 28 '13 at 22:29
-
2If you modify the id of a view in one of your layout files that will force Android Studio to rebuild the R file before running. I use this workaround to bypass having to rebuild. – Software.Developer Feb 11 '14 at 19:52
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.

- 1
- 1

- 1,168
- 1
- 13
- 24
Just Click Build -> Clean Project. It will solve the problem of missing "R.java".

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

- 410
- 3
- 9
-
the issue has been merged with https://code.google.com/p/android/issues/detail?id=56843&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars – Adam Johns Jun 21 '13 at 20:57
As a workaround, deleting the out folder before rebuilding the project solves the problem!

- 1,115
- 6
- 11
-
someone from google commented in the bug thread and said the only real workaround right now is what csongor suggested – Adam Johns Jun 21 '13 at 21:21
Adding the following into the dependencies worked for me:
compile 'com.android.support:appcompat-v7:20.+' compile 'com.android.support:support-v4:21.0.0'

- 1,250
- 18
- 15
Using java 7 inner classes instead of lambda functions provided by retro-lambda solved my issue.

- 1,034
- 10
- 17