问题
I'm trying to use the following library in my Android app:
http://www.jjoe64.com/p/graphview-library.html
I donwloaded the .jar file and added it the Java Build Path, but I got the following error:
java.lang.NoClassDefFoundError: com.jjoe64.graphview.GraphView$GraphViewData[]
On further investigation, I discovered that I had to use the "uses-library" tag in the AndroidManifest under "application".
However, I don't know what to enter under android:name.
<uses-library android:name="com.jjoe64.graphview"></uses-library>
I tried this and other variations but it results in INSTALL_FAILED_MISSING_SHARED_LIBRARY installation error.
What do I do?
Thanks
Edit: Question Answered. How do I close this?
回答1:
Nevermind. Figured it out.
I updated Eclipse's Android ADT to version 18. So I needed to rename my library folder from "lib" to "libs" for it to recognize the class path. I also removed the uses-library tag from the Manifest.
Hope this helps people in the future.
回答2:
Project properties->Java Build Path->Order and Export, check the lib jar.
That should export the lib you are using and thus you shouldn't get the error you mentioned
回答3:
Project properties->Java Build Path->Order and Export, check the lib jar. and your effort for AndroidManifest.xml is not needed, so you can delete it. I have the same problem when I use a third party jar. I solved it by the two comments under your answer.
来源:https://stackoverflow.com/questions/10757116/android-install-failed-missing-shared-library