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