Creating and using custom JAR in Android project
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.
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.
精彩评论