编译出错了
终端和AS编译都有问题
编译错误信息如下:
Error:Execution failed for task ':app:compileReleaseJavaWithJavac'.
> java.lang.VerifyError: Expecting a stackmap frame at branch target 23
Exception Details:
Location:
com/example/Eventbus/annotation/ThreadMode.<init>(Ljava/lang/String;I)V @12: ifeq
Reason:
Expected stackmap frame at this location.
Bytecode:
0000000: 2a2b 1cb7 0006 b200 3db6 0041 9900 0bb2
0000010: 0047 1249 b600 4fb1
具体开发环境详细信息
Mac OX 10.10.5
Android Studio 2.0
Android SDK 23.0.2
Gradle 2.10
JDK 1.8_77
Maven 3.2.3
Groovy 2.4.6
各位大虾们有遇到这个问题么???在线等....
伊谢尔伦2017-04-17 17:10:13
You may have used some library, or some code contains some syntax that is not supported by higher versions, or the bytecode in the library may be incompatible with higher versions of JDK.
I have encountered this problem before. At that time, it was caused by unauthorized modification of the bytecode file in the jar package but the modification was wrong.
The following is a reply seen on stackoverflow for reference:
Java 7 introduced a stricter verification and changed the class format a bit -- to contain a stack map, used to verify that code is correct. The exception you see, means that some method doesn't have a valid stack map.
Java version or bytecode instrumentation could both be to blame. Usually this means that a library that the application uses, generates invalid bytecode that doesn't pass the stricter verification. So nothing else than reporting it as a bug to the library can be done by the developer.
As a workaround you can add -noverify to the JVM arguments in order to disable verification. In Java 7 it was also possible to use -XX:-UseSplitVerifier to use the less strict verification method, but that option was removed in Java 8.