Repackaging .jar-s in Android .aar library

落爺英雄遲暮 提交于 2019-12-05 01:20:46

When you are including Jars in your lib or app - you may including files that have already been compiled using a different java version or with a different configuration than yours and this may cause problems like the one you are experiencing.

I guess the dependency you used refers to a library that does cause the problem that the jar creates.

If it's critical for you not to use dependencies - consider downloading the code for the lib you are using (assuming they are open source and there are no legal limitations) and compiling them with your app as additional modules in your project instead of adding the jar. If you do that - you should definitely consider what jmols wrote about the lib size and method count.

Good luck!

obywatelgcc

Exclude of some modules helped me with same error:

compile ('com.squareup.retrofit2:converter-simplexml:2.1.0'){
    exclude group: 'xpp3', module: 'xpp3'
    exclude group: 'stax', module: 'stax-api'
    exclude group: 'stax', module: 'stax'
}

source link

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!