1

I want to import external JAR file in my android project, to test this i have only created my own jar file, after that i have done following steps.

1)Right-click on my project 2)Build Path > Add External JAR's > Select your archive (.jar) 

The library.jar added to the 'Referenced Libraries' in my project, but after that still i am unable to use classes of my library. So i am not getting how to do this?

0

1 Answer 1

2

Step #1: Undo the steps you did above.

Step #2: Copy the JAR into the libs/ directory of your project.

Only the contents of libs/ are packaged into the APK and are available at runtime.

Sign up to request clarification or add additional context in comments.

3 Comments

Ya i copied JAR into libs, after that what to do?
@AnandK: Nothing. You are done. The contents of libs/ are automatically added both to your compile-time classpath and to your runtime classpath.
@CommonsWare Done, feel free to delete the comment above. stackoverflow.com/questions/29149822/…

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.