Reputation: 6733
Running into this error (as others have ran into before):
java.lang.VerifyError: Expecting a stackmap frame at branch target 18
I found a workaround by adding -noverify
to the jdk options. Of course this is not the actual solution, so I'm trying to find out what is actually wrong with the jar and why it doesn't validate successfully...
Here are two jars, that are know to validate/not validate: - Validates: https://repo.leanplum.com/com/leanplum/Leanplum/1.2.25/ - Not validates: https://repo.leanplum.com/com/leanplum/Leanplum/1.3.1/Leanplum-1.3.1.jar
I tried to get some insights into why it is not validating, tried asm which spit out so many errors for both.
The issue is caused by proguard, because disabling proguard minification makes makes the jar verify again.
Is there any way to find out why the jar does not validate with java?
Upvotes: 0
Views: 263
Reputation: 6200
The jars have been most likely obfuscated/produced by ProGuard and do not contain StackMapFrame attributes. As these jars are mainly used for Android development, there is no need to keep these attributes, as Dalvik does not support such attributes.
If you want to use them in normal Java applications, you will need to create jar files that have proper StackMapFrame attributes (or use the -noverify option). Actually, you can use ProGuard for that as well, take a look at the User Guide.
Upvotes: 1