Android Studio don't generate R.java for my import project

后端 未结 23 1737
天命终不由人
天命终不由人 2020-12-29 04:20

I import a project to Android Studio , but the R.java is always empty.

public final class R {
}

I have tried:

  1. Make project,ma
23条回答
  •  星月不相逢
    2020-12-29 04:51

    I failed even if I tried to update the SDK tools as mentioned here.

    Here is how I solved the problem (for the library projects imported).

    In File -> Project Structure -> Modules, I removed the problematic projects, and added them again by selecting New Module -> Android Library Module.

    Select

    After rebuilding the project, I got all the R.java files back.

提交回复
热议问题