I am new to Android.I have a source code (i.e., jar file) of an app in my PC.How can i get those files into the eclipse i.e., how to open those source code files so as to run them on AVD?
Asked
Active
Viewed 32 times
0
-
u want to access classes of your jar in ur anroid project or to extract jar file – Neha Shukla Jun 03 '14 at 06:49
2 Answers
0
You can use a third party JAR in your application by adding it to your Eclipse project as follows:
- In the Package Explorer panel, right-click on your project and
- select Properties. Select Java Build Path, then the tab Libraries.
- Press the Add External JARs... button and select the JAR file.
For more info see this link Adding an External Library (.jar) using Eclipse
Or More simply
A good way to add external JARs to your Android project or any Java project is:
- Create a folder called libs in your project's root folder
- Copy your JAR files to the libs folder
- Now right click on the Jar file and then select Build Path > Add to Build Path, which will create a folder called 'Referenced Libraries' within your project
Edit
And if you want to see also the .jar classes content then see this link How to decompile a whole Jar file?
0
Convert the .jar to .dex with jar2dex and execute the .Dex for android runs dalvik code but can't run .jar

user192198
- 11
- 4