Infeasible
Status Update
Comments
xa...@google.com <xa...@google.com> #3
Can we get the full stacktrace? (run with --stacktrace).
thanks!
thanks!
ga...@google.com <ga...@google.com> #4
Desugar needs to check if the EnclosingMethod attribute (https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.7.7 ), contains a reference to a method from an interface. Reason is that those methods will be moved to companion classes, and value of these attributes will be incorrect, which might confuse Proguard. Therefore, it will just remove them from the class, if owner is an interface.
So, in your case, while analyzing SomeClass$someMethod$1$1$2$1, Desugar will find EnclosingMethod attribute, and the value of the outer class will be SomeClass$someMethod$1$1$2. Then, it will try to determine if that class is an interface, but it is missing from the jar, so it fails with the error in #1. Can you please check if the missing class is in the jar? Or you doing any bytecode rewriting/generating yourself before Desugar runs?
So, in your case, while analyzing SomeClass$someMethod$1$1$2$1, Desugar will find EnclosingMethod attribute, and the value of the outer class will be SomeClass$someMethod$1$1$2. Then, it will try to determine if that class is an interface, but it is missing from the jar, so it fails with the error in #1. Can you please check if the missing class is in the jar? Or you doing any bytecode rewriting/generating yourself before Desugar runs?
de...@gmail.com <de...@gmail.com> #5
No, before beta-1 or 3.2.0-alpha01 there's no problem with building or testing.
The class is normal Kotlin object-class (singleton), there're some other similar classes in the project, however, no errors would be fired from them.
The class is normal Kotlin object-class (singleton), there're some other similar classes in the project, however, no errors would be fired from them.
ga...@google.com <ga...@google.com> #6
Can you upload .calss files for SomeClass$someMethod$1$1$2$1,and for SomeClass$someMethod$1$1$2? If you are able to provide source code that reproduces the issues, that would help greatly.
de...@gmail.com <de...@gmail.com> #7
You can check out this project https://github.com/XinyueZ/qiaoqiao.git
Use gradle beta-1 or 3.2.0-alpha01 and run: ./gradlew clean assembleDebug
My first evidence is CameraSetup at line 74 where the first argument ShutterCallback might reproduce the problem.
I have tried to pass these all two params explicitly without lambda and the error lands on ShutterCallback directly.
Use gradle beta-1 or 3.2.0-alpha01 and run: ./gradlew clean assembleDebug
My first evidence is CameraSetup at line 74 where the first argument ShutterCallback might reproduce the problem.
I have tried to pass these all two params explicitly without lambda and the error lands on ShutterCallback directly.
ga...@google.com <ga...@google.com> #8
The issue seems to be in kotlinc. It produces CameraSetup$setup$1$1$2$1.class class files, that contains EnclosingMethod attribute that points to CameraSetup$setup$1$1$2, that does not exist. I am trying to create a simpler project that reproduces the issue.
de...@gmail.com <de...@gmail.com> #9
thanks friend
ga...@google.com <ga...@google.com> #10
I've filled https://youtrack.jetbrains.com/issue/KT-22663 . Thank for providing the sample, it helped quite a lot.
As a workaround, you can try to avoid using these code patterns, or you can enable D8 desugaring by specifying android.enableD8.desugaring=true in gradle.properties.
As a workaround, you can try to avoid using these code patterns, or you can enable D8 desugaring by specifying android.enableD8.desugaring=true in gradle.properties.
de...@gmail.com <de...@gmail.com> #11
ok, I try.
de...@gmail.com <de...@gmail.com> #12
it works with the workaround.
dj...@gmail.com <dj...@gmail.com> #13
Hello, I had the same issue, and it was related to a library that had a not fixed version (2.2.+) and all the sudden updated and then my project started having the ""main" java.lang.NullPointerException: Couldn't find outer...-->here I had the affected class so I could detect the lib with the issue"
I hope this helps.
I hope this helps.
Description
....
......
Exception in thread "main" java.lang.NullPointerException: Couldn't find outer class xxxxx/SomeClass$someMethod$1$1$2 of xxxx/SomeClass$someMethod$1$1$2$1
....
......
execution failed for task ':app:transformClassesWithDesugarForDevDebug'.
See also here