I import a project to Android Studio , but the R.java is always empty.
public final class R {
}
I have tried:
I had a similar problem in a large multi-module project with many dependencies among the modules. What worked for me, was to attempt to build separately from command line all the modules that failed to build within Android Studio. That gave me indications on resources missing in each project. From the project level in my console I did:
$ cd moduleName
$ ../gradlew assembleDebug
This provided me with a number of 'No resource found that matches the given name' errors, that weren't shown before, when I build the project as a whole.