-3

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

Ashish
  • 1,943
  • 2
  • 14
  • 17
linx
  • 1

2 Answers2

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