Reputation: 39
i want to convert some data into JSON to transmit. but since the android methods about JSON are quite tedious. i create a user library and import some JSON jar files i always use in JSE project. then when i launch the android project, Android Packaging Problem occurs. in the problem tag, it says like " Description: Conversion to Dalvik format failed with error 1 Location: Unknown Type: Android Packaging Problem". i check out the problem on the internet, and try to fix it by CLEANING the project. however, it doesn' work. somebody has some experience dealing with this problem? pls help me. thanks in advance.
Upvotes: 0
Views: 2355
Reputation: 2132
select project
2.select libraries tag
3.click add external jar. select the jar file . CLICK OK. That's all you need to do.
Upvotes: 0
Reputation: 1007658
i import the JSON jar by adding new library in the Java Build Path
Do not do that.
Instead, create a libs/
directory in your project and put the JAR there. If you are on the latest version of the ADT plugin for Eclipse, having your JAR be in libs/
will automatically add it to your build path and will automatically include the JAR's contents in your APK.
Upvotes: 3