I'm developping a Samsung Gear
application with Samsung's accessory-v1.0.0.jar
.
When I try to create a signed apk (which preforms proguard steps) I get Unknown verification type [10] in stack map frame
exception, because of Samsung's SAAgent
class in accessory-v1.0.0.jar
.
I couldn't find any solutions, do you have a workaround for this?
Same problem (not answered on Samsung's forum) here.
Similar problem on Samsung's SPen SDK (this problem was solved on a later version of SPen SDK)
What I've tried so far, which didn't help me:
1) Added below proguard elements:
-keepclassmembers class com.samsung.** { *; }
-keep class com.samsung.** { *; }
-dontwarn com.samsung.**
-keepattributes InnerClasses
2) Used proguard 4.7 and 4.11.
3) Created a new Android project, added just accessory-v1.0.0.jar at its libs folder, I didn't write any code and tried to sign the apk. Same error occured.
[2014-05-22 17:13:06 - SAGalleryProguardTest] Proguard returned with error code 1. See console
[2014-05-22 17:13:06 - SAGalleryProguardTest] java.io.IOException: Can't read [C:\Devel\Workspace\SAGalleryProguardTest\libs\accessory-v1.0.0a.jar] (Can't process class [com/samsung/android/sdk/accessory/SAAgent.class] (Unknown verification type [10] in stack map frame))
[2014-05-22 17:13:06 - SAGalleryProguardTest] at proguard.InputReader.readInput(InputReader.java:230)
[2014-05-22 17:13:06 - SAGalleryProguardTest] at proguard.InputReader.readInput(InputReader.java:200)
[2014-05-22 17:13:06 - SAGalleryProguardTest] at proguard.InputReader.readInput(InputReader.java:178)
[2014-05-22 17:13:06 - SAGalleryProguardTest] at proguard.InputReader.execute(InputReader.java:78)
[2014-05-22 17:13:06 - SAGalleryProguardTest] at proguard.ProGuard.readInput(ProGuard.java:196)
[2014-05-22 17:13:06 - SAGalleryProguardTest] at proguard.ProGuard.execute(ProGuard.java:78)
[2014-05-22 17:13:06 - SAGalleryProguardTest] at proguard.ProGuard.main(ProGuard.java:492)
[2014-05-22 17:13:06 - SAGalleryProguardTest] Caused by: java.io.IOException: Can't process class [com/samsung/android/sdk/accessory/SAAgent.class] (Unknown verification type [10] in stack map frame)
[2014-05-22 17:13:06 - SAGalleryProguardTest] at proguard.io.ClassReader.read(ClassReader.java:112)
[2014-05-22 17:13:06 - SAGalleryProguardTest] at proguard.io.FilteredDataEntryReader.read(FilteredDataEntryReader.java:87)
[2014-05-22 17:13:06 - SAGalleryProguardTest] at proguard.io.JarReader.read(JarReader.java:65)
[2014-05-22 17:13:06 - SAGalleryProguardTest] at proguard.io.DirectoryPump.readFiles(DirectoryPump.java:65)
[2014-05-22 17:13:06 - SAGalleryProguardTest] at proguard.io.DirectoryPump.pumpDataEntries(DirectoryPump.java:53)
[2014-05-22 17:13:06 - SAGalleryProguardTest] at proguard.InputReader.readInput(InputReader.java:226)
[2014-05-22 17:13:06 - SAGalleryProguardTest] ... 6 more
[2014-05-22 17:13:06 - SAGalleryProguardTest] Caused by: java.lang.RuntimeException: Unknown verification type [10] in stack map frame
[2014-05-22 17:13:06 - SAGalleryProguardTest] at proguard.classfile.io.ProgramClassReader.createVerificationType(ProgramClassReader.java:890)
[2014-05-22 17:13:06 - SAGalleryProguardTest] at proguard.classfile.io.ProgramClassReader.visitFullFrame(ProgramClassReader.java:659)
[2014-05-22 17:13:06 - SAGalleryProguardTest] at proguard.classfile.attribute.preverification.FullFrame.accept(FullFrame.java:114)
[2014-05-22 17:13:06 - SAGalleryProguardTest] at proguard.classfile.io.ProgramClassReader.visitStackMapTableAttribute(ProgramClassReader.java:452)
[2014-05-22 17:13:06 - SAGalleryProguardTest] at proguard.classfile.attribute.preverification.StackMapTableAttribute.accept(StackMapTableAttribute.java:71)
[2014-05-22 17:13:06 - SAGalleryProguardTest] at proguard.classfile.io.ProgramClassReader.visitCodeAttribute(ProgramClassReader.java:422)
[2014-05-22 17:13:06 - SAGalleryProguardTest] at proguard.classfile.attribute.CodeAttribute.accept(CodeAttribute.java:101)
[2014-05-22 17:13:06 - SAGalleryProguardTest] at proguard.classfile.io.ProgramClassReader.visitProgramMethod(ProgramClassReader.java:200)
[2014-05-22 17:13:06 - SAGalleryProguardTest] at proguard.classfile.io.ProgramClassReader.visitProgramClass(ProgramClassReader.java:142)
[2014-05-22 17:13:06 - SAGalleryProguardTest] at proguard.classfile.ProgramClass.accept(ProgramClass.java:346)
[2014-05-22 17:13:06 - SAGalleryProguardTest] at proguard.io.ClassReader.read(ClassReader.java:91)
[2014-05-22 17:13:06 - SAGalleryProguardTest] ... 11 more