What's the easiest way to force Idea to generate the R.Java file?

前端 未结 9 1830
抹茶落季
抹茶落季 2021-01-11 20:43

I am trying to run Android sample applications using intellij idea and R.Java file is missing form notepad samples source directory.

9条回答
  •  一个人的身影
    2021-01-11 21:34

    Also make sure to check your imports. Sometimes when your IDE (eclipse & intellij as well) cannot find your generated R class and auto-imports android.R.

    import android.R kills everything you are doing in your generated sources!

    Cost me 30min of my life...

提交回复
热议问题