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

后端 未结 23 1689
天命终不由人
天命终不由人 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:25

    I had this problem after update gradle...

    There are several reasons that causes the project not to be built:

    1-Unknown error in drawable or xml files

    2-Update gradle or libraries and etc ...

    Solution :

    1-Clean and rebuild project

    2-Delete .idea and build folders in project file(shown in picture) then goto "File/Invalidate catch-restart"

    3-Roll back to previous gradle version and libraries.

提交回复
热议问题