当前位置:   article > 正文

Task :app:transformClassesWithDesugarForDebug_task app transformclasseswithrobustfor

task app transformclasseswithrobustfor

kotlin编译遇到问题: 

> Task :app:transformClassesWithDesugarForDebug 
transformClassesWithDesugarForDebug executing ... 

Exception in thread "main" java.lang.NullPointerException: Couldn't find outer class com/xxxx/xxxxx/xxxx/xxxx/xxxx/xxxx$initData$1$1$1$1 of com/xxxx/xxxx/xxxx/xxxx/xxx/xxxx$initData$1$1$1$1$2
        at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:1079)
        at com.google.devtools.build.android.desugar.ClassVsInterface.isOuterInterface(ClassVsInterface.java:56)
        at com.google.devtools.build.android.desugar.InterfaceDesugaring.visitOuterClass(InterfaceDesugaring.java:246)
        at org.objectweb.asm.ClassReader.accept(ClassReader.java:638)
        at org.objectweb.asm.ClassReader.accept(ClassReader.java:500)
        at com.google.devtools.build.android.desugar.Desugar.desugarClassesInInput(Desugar.java:477)
        at com.google.devtools.build.android.desugar.Desugar.desugarOneInput(Desugar.java:361)
        at com.google.devtools.build.android.desugar.Desugar.desugar(Desugar.java:314)
        at com.google.devtools.build.android.desugar.Desugar.main(Desugar.java:711)


> Task :app:transformClassesWithDesugarForDebug FAILED
transformClassesWithDesugarForDebug done costTime = 0 m 10 s 448ms


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesWithDesugarForDebug'.
> com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: Error while executing java process with main class com.google.devtools.build.android.desugar.Desugar with arguments {--input 

翻阅了stack overflow上的多种方法无果,后同事告知是由于kotlin let语句多层嵌套导致(手动牛逼),去掉initData中嵌套的let层级,编辑就可以通过了,记录一下。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Cpp五条/article/detail/306648
推荐阅读
相关标签
  

闽ICP备14008679号