Reputation: 13178
I was using Android studio now for a long time and it was fine. Recently, not sure what happened, but when I click on debug and have it perform make
it complains about the R file and it seems like it doesn't generate it.
The only way it works is if I click on Build > Rebuild Project
...problem is that it takes a long time for that to go through.
Is there anything I am missing? I updated the Android SDK tools, etc. as per some of the other suggestions?
Upvotes: 2
Views: 9351
Reputation: 1
And remove all "import android.R" , and rebuild it and import them again its working for me
Upvotes: -1
Reputation: 3543
Solution for android studio Users :
Goto : Menu tab - > Build - > Rebuild Project
after rebuild Project.R.Java file will be solve automatically ..
Upvotes: 1
Reputation: 513
Try to import android.R, for every class you need R (of the package) and then compile, it makes different error from before.
And remove all ('import android.R') , and rebuild it.
This trick is not for solving problem in proper way, but makes the tool refresh.
Upvotes: 0
Reputation: 30088
I was having the same problem, but it looks like a new update came out today. It seems to have solved the problem.
Upvotes: 0
Reputation: 26007
Yes this is a known issue in the newest version of android studio. Google has suggested a temporary workaround until they can track down the problem and fix in next release. Turn off external builds in preferences > compiler
. It might help.
Source: cannot resolve R into variable after Android studio update and R.java not updated after update to 0.1.6 .
Hope this helps.
Upvotes: 4