Couldn't find outer class com/razorpay/Y_$B$ of com/razorpay/Y_$B$$5

我与影子孤独终老i 提交于 2019-12-10 18:28:45

问题


I am implementing RazorPay android checkout. I followed Razorpay Android sdk doc. When running app gradle build fails with this error. I have posted that on RazorPay also.

Exception in thread "main" java.lang.NullPointerException: Couldn't find outer class com/razorpay/Y_$B$ of com/razorpay/Y_$B$$5
    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)

If some developer faced this issue, please tell me a solution.

I have no code to show, its only picked from above razorpay doc.


回答1:


I found solution after searching a lot.

This issue occurred after updating to new Android Studio and build:gradle. This is not RazorPay sdk issue.

Similar issue is reported in google tracker

To solve this, just downgrade build.gradle version in your project level build.gradle.

buildscript {

    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'
        ...
    }
}

This resolved my issue. Hope will do for you too.




回答2:


You can try adding android.enableD8.desugaring = true to gradle.properties



来源:https://stackoverflow.com/questions/50344132/couldnt-find-outer-class-com-razorpay-y-b-of-com-razorpay-y-b5

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!