Android Studio更新3.1后报错

3.1 gradle 对依赖包及寄来工程的引用关键字发生改变:

compile 改为 api,
instrumentTest 改为 
androidTest

具体原因百度好了。

https://www.jianshu.com/p/4e6bd83900b3


升级3.1后build报错,gradle错误,降级到3.0,依旧报错日志如下:

8:37    Gradle sync failed: Uninitialized object exists on backward branch 70
        Exception Details:
        Location:
        com/android/build/gradle/tasks/BuildArtifactReportTask.newArtifact(Lcom/android/build/api/artifact/BuildableArtifact;)Lcom/android/build/gradle/tasks/BuildArtifactReportTask$BuildableArtifactData; @119: goto
        Reason:
        Error exists in the bytecode
        Bytecode:
        0000000: bb00 f459 2bb9 0139 0100 c000 6b2b b901
        0000010: 3d01 0001 b901 4302 0059 1301 45b8 0148
        0000020: c000 374d 3a0d 3a0c 3a0b 2c4e bb00 6859
        0000030: 2c10 0ab8 003d b700 69c0 006b 3a04 2db9
        0000040: 0054 0100 3a05 1905 b900 5a01 0099 002d
        0000050: 1905 b900 5e01 003a 0619 0419 06c0 014a
        0000060: 3a07 3a0e 1907 b901 4d01 003a 0f19 0e19
        0000070: 0fb9 0075 0200 57a7 ffcf 1904 c000 773a
        0000080: 0e19 0b19 0c19 0d19 0eb7 0150 b0       
        Stackmap Table:
        full_frame(@70,{Object[#2],Object[#109],Object[#55],Object[#55],Object[#107],Object[#86],Top,Top,Top,Top,Top,Uninitialized[#0],Uninit... (show balloon)

原因,可能是jdk问题,更改使用as自带的:
File-Project Structure-左侧Sdk Location,勾选User embedded JDK



作者:lhl_012
链接:https://www.jianshu.com/p/4e6bd83900b3
來源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

你可能感兴趣的:(android)