本文介绍了找不到外部类com/razorpay/Y_ $ B $的com/razorpay/Y_ $ B $$ 5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在实现 RazorPay android结帐.我关注了 Razorpay Android SDK文档. 在运行应用gradle时,构建失败并显示此错误.我也将其发布在RazorPay上.

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)

如果某些开发人员遇到此问题,请告诉我一个解决方案.

我没有要显示的代码,只能从razorpay文档中提取.

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

推荐答案

经过大量搜索,我找到了解决方案.

I found solution after searching a lot.

此问题在更新到新的Android Studio和build:gradle后发生. 这不是RazorPay sdk问题.

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

google跟踪器 中报告了类似的问题

Similar issue is reported in google tracker

要解决此问题,只需在您的项目级别build.gradle中将build.gradle版本降级.

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'
        ...
    }
}

这解决了我的问题.希望也能为您服务.

这篇关于找不到外部类com/razorpay/Y_ $ B $的com/razorpay/Y_ $ B $$ 5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-15 20:07