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

前端 未结 9 1731
抹茶落季
抹茶落季 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:21

    Use Build | Make. Actually, IDEA generates R.java file automatically every time you make a change in any XML file under the /res directory.

    UPDATE: /gen directory must be present in the project and also configured as a Source root in IDEA module so that it can resolve the IDs in your source code.

提交回复
热议问题