XStream 1.4.8 compiled for Java 8 , and the latest version of Android supports Java 7 .
One solution is to use XStream 1.4.7 , which works with Android, and the other to download XStream 1.4.8 sources and compile them yourself. In this case, you will have to remove LambdaMapper.java and possibly some other problematic classes.
You may also have problems with different versions of the xmlpull parser. In this case, you can exclude it from compilation.
compile('com.thoughtworks.xstream:xstream:1.4.7') { exclude group: 'xmlpull', module: 'xmlpull' }
Dalija prasnikar
source share