AndroidStudio doesn't create R.java?

偶尔善良 提交于 2019-12-13 02:49:04

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!