views:

284

answers:

1

I am trying to create and use jar file in an Android project under Eclipse. I have tried various methods without any success. Here are the steps:

  • Create jar file from the source files jar -cf lib.jar *.java
  • Copy jar file to libs folder
  • Right click, Build Path->Add to Build path
  • Now, compiler gives unresolved symbols if I try to use a class from the jar file?

Can someone please let me know correct method to create and use an external jar file for the Android project under eclipse.

A: 

This worked fine for me:

1)Place Jars in assets folder.

2)Right click on project name.

3)Select properties.

4)Select Java build path.

5) Select Libraries.

6) Click Add Jars.

Donal Rafferty