I upgraded the ProGuard version in my project to 7.8, and now when I build the release app, I get the following exception:
java.lang.ClassCastException: class proguard.classfile.attribute.StructuredLineNumberInfo cannot be cast to class proguard.classfile.attribute.ExtendedLineNumberInfo (proguard.classfile.attribute.StructuredLineNumberInfo and proguard.classfile.attribute.ExtendedLineNumberInfo are in unnamed module of loader 'app')
at proguard.optimize.peephole.LineNumberLinearizer.visitLineNumberInfo(LineNumberLinearizer.java:163) ~[proguard-base-7.8.0.jar:7.8.0]
at proguard.classfile.attribute.LineNumberTableAttribute.lineNumbersAccept(LineNumberTableAttribute.java:126) ~[proguard-core-9.2.0.jar:9.2.0]
at proguard.optimize.peephole.LineNumberLinearizer.visitLineNumberTableAttribute(LineNumberLinearizer.java:144) ~[proguard-base-7.8.0.jar:7.8.0]
at proguard.classfile.attribute.LineNumberTableAttribute.accept(LineNumberTableAttribute.java:114) ~[proguard-core-9.2.0.jar:9.2.0]
at proguard.classfile.attribute.CodeAttribute.attributesAccept(CodeAttribute.java:186) ~[proguard-core-9.2.0.jar:9.2.0]
at proguard.optimize.peephole.LineNumberLinearizer.visitCodeAttribute(LineNumberLinearizer.java:128) ~[proguard-base-7.8.0.jar:7.8.0]
at proguard.classfile.attribute.CodeAttribute.accept(CodeAttribute.java:105) ~[proguard-core-9.2.0.jar:9.2.0]
at proguard.classfile.ProgramMethod.attributesAccept(ProgramMethod.java:118) ~[proguard-core-9.2.0.jar:9.2.0]
at proguard.optimize.peephole.LineNumberLinearizer.visitProgramMethod(LineNumberLinearizer.java:117) ~[proguard-base-7.8.0.jar:7.8.0]
at proguard.classfile.ProgramMethod.accept(ProgramMethod.java:113) ~[proguard-core-9.2.0.jar:9.2.0]
at proguard.classfile.ProgramClass.methodsAccept(ProgramClass.java:589) ~[proguard-core-9.2.0.jar:9.2.0]
at proguard.optimize.peephole.LineNumberLinearizer.visitProgramClass(LineNumberLinearizer.java:108) ~[proguard-base-7.8.0.jar:7.8.0]
at proguard.classfile.ProgramClass.accept(ProgramClass.java:491) ~[proguard-core-9.2.0.jar:9.2.0]
at proguard.classfile.ClassPool.classesAccept(ClassPool.java:218) ~[proguard-core-9.2.0.jar:9.2.0]
at proguard.optimize.peephole.LineNumberLinearizer.execute(LineNumberLinearizer.java:81) ~[proguard-base-7.8.0.jar:7.8.0]
at proguard.pass.PassRunner.run(PassRunner.java:24) ~[proguard-base-7.8.0.jar:7.8.0]
at proguard.ProGuard.linearizeLineNumbers(ProGuard.java:488) ~[proguard-base-7.8.0.jar:7.8.0]
at proguard.ProGuard.execute(ProGuard.java:206) ~[proguard-base-7.8.0.jar:7.8.0]
at proguard.ProGuard.main(ProGuard.java:649) [proguard-base-7.8.0.jar:7.8.0]
Unfortunately, I can't easily share the reproducer (can try to create one if this issue is not easily reproducible), but according to the changelog, the new version of proguard-core introduced StructuredLineNumberInfo and deprecated ExtendedLineNumberInfo, which ProGuard itself hasn't yet migrated to - that's likely the cause of the exception.
I upgraded the ProGuard version in my project to 7.8, and now when I build the release app, I get the following exception:
Unfortunately, I can't easily share the reproducer (can try to create one if this issue is not easily reproducible), but according to the changelog, the new version of proguard-core introduced
StructuredLineNumberInfoand deprecatedExtendedLineNumberInfo, which ProGuard itself hasn't yet migrated to - that's likely the cause of the exception.