I am working on an existing android project
. I want to create a jar
file from a package of that project and add that as a library
. (i.e. i have 5 packages in that project, i want to create a jar from one of those packages and add that package as library). As I am new to java and android, i could not understand what will be the best approach for achieving above goal. thanks
Asked
Active
Viewed 87 times
-3
-
1Duplicate: http://stackoverflow.com/questions/3642928/adding-a-library-jar-to-an-eclipse-android-project – Rajendra arora Feb 10 '14 at 06:42
-
@developer known as Insane, thanks for pointing this – linx Feb 13 '14 at 04:04
2 Answers
1
Create Jar File: -
1. Select package from package explorer.
2. Go to File -> Export -> Create Java -> Jar File.
3. Perform wizard steps.
Add jar file to Project. -
Now put this created jar file in to libs folder of the Project and add it to build path.`

nisha.113a5
- 2,024
- 16
- 30
0
If you are working on Eclipse then right click
Package Name> Export >Java >JAR file
and then you can add this jar file in your libs and use it wherever you want

Mayank Saini
- 3,017
- 24
- 25