Android Problem Collection 49: Can ' t add XStream file dependency to Android Studio project

Source: Internet
Author: User

Introduce xstream1.4.8 into the Android Strudio project and compile an error as follows:

Unexpected top-level EXCEPTION:com.android.dx.cf.iface.ParseException:bad classfileMagic (Cafebabe)or version(0034.0000) atCOM.ANDROID.DX.CF.DIRECT.DIRECTCLASSFILE.PARSE0 (Directclassfile.java:472) atCom.android.dx.cf.direct.DirectClassFile.parse (Directclassfile.java:406) atCom.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary (Directclassfile.java:388) atCom.android.dx.cf.direct.DirectClassFile.getMagic (Directclassfile.java:251) atCom.android.dx.command.dexer.Main.processClass (Main.java:665) atCom.android.dx.command.dexer.Main.processFileBytes (Main.java:634) atcom.android.dx.command.dexer.main.access$ -(Main.java: +) atcom.android.dx.command.dexer.main$1.Processfilebytes (Main.java:572) atCom.android.dx.cf.direct.ClassPathOpener.processArchive (Classpathopener.java:284) atCom.android.dx.cf.direct.ClassPathOpener.processOne (Classpathopener.java:166) atCom.android.dx.cf.direct.ClassPathOpener.Process(Classpathopener.java:144) atCom.android.dx.command.dexer.Main.processOne (Main.java:596) atCom.android.dx.command.dexer.Main.processAllFiles (Main.java:498) atCom.android.dx.command.dexer.Main.runMonoDex (Main.java: the) atCom.android.dx.command.dexer.Main.run (Main.java: the) atCom.android.dx.command.dexer.Main.main (Main.java:199) atCom.android.dx.command.Main.main (Main.java:103)... whileParsing Com/thoughtworks/xstream/mapper/lambdamapper.class1Error Abortingerror:execution failed forTask': App:predexdebug '.> Com.android.ide.common.Process. ProcessException:org.gradle.Process. Internal. Execexception:process' command '/opt/jdk/jdk1. 7. 0_71/bin/java"'Finished withnon-ZeroExitvalue 1Information:build FAILED

The reason for this is that xstream1.4.8 compiled for Java8, and currently only supports JAVA7 as yet. Then we had to use the lower version of XStream.

Everyone can try to download here, but the heartless guy wants 6 points. However, the example and jar package are very full, the points can contact me less.
http://download.csdn.net/download/xiaokui_wingfly/8800295

Since JSON and XML can be parsed, the library should be able to eat well. Many projects now parse XML and parse JSON. If a library is done, the cost of learning will be much lower.

Reference:
http://stackoverflow.com/questions/28946049/cant-add-xstream-file-dependency-to-android-studio-project/28971602

Android Problem Collection 49: Can ' t add XStream file dependency to Android Studio project

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.