Is there a way to create an R.java file in Android Studio?

I have a saved Android project a long time ago, and now I have to work on it.

I created a new project in Android Studio, and I imported all the Java and XML files inside it, but the file is R.javamissing.

I think this did not save the original. Can I somehow restore it or generate it?

+4
source share
1 answer

R.javaAndroid Studio is very different than Eclipse. Since you say this is an old project, I assume it was originally from Eclipse. The Eclipse is R.javaincluded in the source tree. However, in Android Studio it is hidden. From another stack overflow answer :

1. build

This has all the full output of the process make, i.e. classes.dex, compiled classes and resources, etc.

Only a few folders are displayed in the Android Studio GUI. Important that your R.java is here under build/source/<flavor>/r/<build type(optional)>/<package>/R.java

R.java . . , , - R.java , . , .

+6

Source: https://habr.com/ru/post/1584666/


All Articles