本文介绍了java.lang.NoSuchMethodError:没有静态方法isAtLeastR()Z的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的应用运行正常,但突然我开始出现此错误
My app was running fine but suddenly I started getting this error
此行出现问题
GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestEmail()
.build();
mGoogleSignInClient = GoogleSignIn.getClient(this, gso);
推荐答案
我在React Native上也遇到了这个问题.我通过在我的app/build.gradle中设置它来修复它:
I had this issue with React Native as well. I fixed it by setting this in my app/build.gradle:
dependencies {
// ...
implementation 'com.google.android.gms:play-services-base:17.1.0'
// ...
}
这是因为几天前Google play-services-base库引入了一项重大更改.如果使用implementation 'com.google.android.gms:play-services-base:+'
,它将下载该库的最新版本,并将该错误引入您的应用程序.希望有帮助.
It's because of a breaking change introduced by Google play-services-base library a couple days ago. If you use implementation 'com.google.android.gms:play-services-base:+'
it will download the latest version of the library, introducing that bug into your app. Hope that helps.
这篇关于java.lang.NoSuchMethodError:没有静态方法isAtLeastR()Z的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!