Dx unsupported class file version 52.0 ...while parsing okio/AsyncTimeout.class

来源:互联网 发布:人工智能老师 编辑:程序博客网 时间:2024/05/23 01:20

 Dx unsupported class file version 52.0 ...while parsing okio/AsyncTimeout.class

 Dx 1 error; aborting

 Conversion to Dalvik format failed with error 1

今天在使用我看okhttp以及okio的时候,打okio jar包时遇到了上述错误,

后来经过翻阅资料发现,是因为打okio的jar包使用的是jdk 8,换成jdk 7就OK了。

在Google上搜到的:

You have to tell your java compiler to produce java 7 compatible class files, because android (dex) does not support java 8 at the moment.
If you want to use lambdas in your sources, you can use retrolambda (https://github.com/evant/gradle-retrolambda) or the new Jack compiler (https://developer.android.com/preview/j8-jack.html)





0 0
原创粉丝点击