问题
I'm using Android Studio v0.2.6
and I don't know why, but there is no R.java
file created in my project. Therefore the autocomplete-thing tries to import android.R
and everything is messed up. Is there any way to force AS to reset the project properties and try to recreate the R.java
? Rebuilding doesn't work, I tried a lot that was suggested in other questions.
回答1:
I've had a similar issue - make sure your src, gen and libs folders are set as source folder in the Project Structure dialog. ( Open Project Structure -> Modules -> YourApp -> Sources. Ctrl click src and gen and click Sources above )
来源:https://stackoverflow.com/questions/18574792/androidstudio-doesnt-create-r-java