0

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?

2 Answers2

0

You can use a third party JAR in your application by adding it to your Eclipse project as follows:

  1. In the Package Explorer panel, right-click on your project and
  2. select Properties. Select Java Build Path, then the tab Libraries.
  3. 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:

  1. Create a folder called libs in your project's root folder
  2. Copy your JAR files to the libs folder
  3. 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?

Community
  • 1
  • 1
Giru Bhai
  • 14,370
  • 5
  • 46
  • 74
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