Error converting bytecode to dex:

Error converting bytecode to dex:

在导入第三方jar包的时候,编译时出错

Error converting bytecode to dex:

将字节码转换为Dex错误:
原因:Dex无法解析版本52字节码。
这是由于库依赖关系已编译使用Java 8以上。
如果您使用的是java的gradle库子模块添加插件
targetCompatibility = ' 1.7 '
sourceCompatibility = ' 1.7 '
子模块的构建。gradle文件。

然后百度一下,发现在

https://stackoverflow.com/questions/49891730/invoke-customs-are-only-supported-starting-with-android-0-min-api-26

有解答

Error converting bytecode to dex:

 发现任然报错

Error converting bytecode to dex:

jack需要java 8 的支持或者需要移除sourceCompatibility JavaVersion.VERSION_1_8.

搞不懂...

Error converting bytecode to dex:

然后又发现版本不对  改成3.1.0之后  编译报错...

Error converting bytecode to dex:

好吧...

Error converting bytecode to dex:

Error converting bytecode to dex: 

修改下配置...

Error converting bytecode to dex:

Error converting bytecode to dex: 

神奇的发现之前的报错信息不见???  又有新的报错信息  我的天

Error converting bytecode to dex:

大致的意思是 找不到这个类了...

再重新编译

Process 'command 'F:\Install\Java\jdk1.8.0_121\bin\java.exe'' finished with non-zero exit value 1

Error converting bytecode to dex:

然后又百度一下看有什么解决办法

https://www.cnblogs.com/wangying222/p/6043311.html

用第二个方法

编译报错  报错信息

Configuration 'provided' is obsolete and has been replaced with 'compileOnly'.
It will be removed at the end of 2018

Error converting bytecode to dex:

 然后这报错信息改

把provided改成compileOnly

Error converting bytecode to dex:

 编译的时候终于没有报错了

Error converting bytecode to dex: