"Android" uses Net.sf.json in Android

Source: Internet
Author: User

Net.sf.json is better than the JSON that comes with Android, and using Net.sf.json on Android will result in an error, because you need to rely on other packages when using Json-lib-2.4-jdk15.jar.

Commons-beanutils-1.7.0.jar

Commons-collections-3.1.jar

Commons-lang-2.5.jar

Commons-logging.jar

Ezmorph-1.0.3.jar

But pack them up and find out that there will be an error in Android studio.

Error:execution failed for task ': App:transformclasseswithjarmergingfordebug '.
> Com.android.build.api.transform.TransformException:java.util.zip.ZipException:duplicate entry:org/apache/ Commons/collections/arraystack.class

The reason is because the org/apache/commons/in Commons-beanutils-1.7.0.jar Collections and Commons-collections-3.1.jar inside the things repeat, therefore, you can use the decompression software to view the Commons-beanutils-1.7.0.jar and the inside of the collections folder deleted, you can resolve the conflict.

"Android" uses Net.sf.json in Android

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.