0

I used the instruction here : Is there a way to get the source code from an APK file? It was really good. I got almost everything of my lost project but no R.java file. It is nececery to import the project to eclipse. How can I extract this file from apk file? Where can I find it?

tnx.

Community
  • 1
  • 1
hamid
  • 852
  • 11
  • 27

3 Answers3

2

R.java is created automatically on Eclipse and other IDEs. Removing the line from my main activity that says import R.java usually helps my IDE recognize that it's not there, and it recreates it when you try to run the program. If that doesn't work, try Project, Clean... and try running it again.

Andy Harris
  • 928
  • 5
  • 10
2

You cannot directly extract r.java file, but the contents of r.java file can be extracted using 'aapt' tool. the following command gives list of all resources and their respective IDs as present in r.java file:

aapt d resources name_of_apk
Volker E.
  • 5,911
  • 11
  • 47
  • 64
Phani
  • 131
  • 1
  • 3
1

You don't need the R.java file. It is automatically generated by the Android SDK when you try to run your android application.

rekire
  • 47,260
  • 30
  • 167
  • 264