【问题标题】:I am facing issue in Flutter while run my application [closed]运行我的应用程序时我在 Flutter 中遇到问题[关闭]
【发布时间】:2022-01-21 18:33:06
【问题描述】:

我收到此错误,升级 pubspec.yaml 中的所有插件后。这是第一次发生,我已经在 build.gradle 中添加了设置为 16 的 google gms 服务

E/AndroidRuntime(15809): java.lang.NoSuchMethodError: No static method isAtLeastR()Z in class Lcom/google/android/gms/common/util/PlatformVersion; or its super classes (declaration of 'com.google.android.gms.common.util.PlatformVersion' appears in /data/app/~~JfP3wXyoXYoELpSoGWT6BA==/com.sales.track-rakLI-SsZSlGKP6o0EIh4Q==/base.apk)
E/AndroidRuntime(15809):    at com.google.android.gms.common.api.GoogleApi.<init>(com.google.android.gms:play-services-base@@18.0.1:8)
E/AndroidRuntime(15809):    at com.google.android.gms.common.api.GoogleApi.<init>(com.google.android.gms:play-services-base@@18.0.1:22)
E/AndroidRuntime(15809):    at com.google.android.gms.common.api.GoogleApi.<init>(com.google.android.gms:play-services-base@@18.0.1:23)
E/AndroidRuntime(15809):    at com.google.android.gms.location.FusedLocationProviderClient.<init>(Unknown Source:8)
E/AndroidRuntime(15809):    at com.google.android.gms.location.LocationServices.getFusedLocationProviderClient(Unknown Source:2)
E/AndroidRuntime(15809):    at proto.inventa.cct.com.inventalibrary.InventaSdk.initialize(Unknown Source:70)
E/AndroidRuntime(15809):    at proto.inventa.cct.com.inventalibrary.InventaSdk.initializeInventaSdk(Unknown Source:2)
E/AndroidRuntime(15809):    at com.spicemoney.spiceimpact.spice_impact.DistrictApplications.onCreate(DistrictApplications.java:46)
E/AndroidRuntime(15809):    at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
E/AndroidRuntime(15809):    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7283)
E/AndroidRuntime(15809):    at android.app.ActivityThread.access$1700(ActivityThread.java:303)
E/AndroidRuntime(15809):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2183)
E/AndroidRuntime(15809):    at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(15809):    at android.os.Looper.loop(Looper.java:261)
E/AndroidRuntime(15809):    at android.app.ActivityThread.main(ActivityThread.java:8279)
E/AndroidRuntime(15809):    at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(15809):    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:632)
E/AndroidRuntime(15809):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1049)

【问题讨论】:

  • 我们无法仅通过堆栈跟踪来帮助您。您可以发布演示此错误的最小代码吗?

标签: java android firebase flutter android-studio


【解决方案1】:

在build.gradle里面有减少依赖版本google-sign插件需要的解决方案。

我们的基本目标是根据基于 gms 服务的其他依赖项更改支持数

将其转换为

实现('com.google.android.gms:play-services-auth:20.0.1')

这样的

实现('com.google.android.gms:play-services-auth:16.+'){ 排除组:'com.android.support',模块:'support-v4' }

【讨论】:

  • 这似乎与您在上面发布的堆栈跟踪无关。能说一下是什么关系吗?
  • 如果这是关于问题的附加信息,您应该将其编辑到问题中,而不是将其作为答案发布。如果您确实打算将其作为答案,请详细说明它如何解决问题。
  • 正如目前所写,您的答案尚不清楚。请edit 添加其他详细信息,以帮助其他人了解这如何解决所提出的问题。你可以找到更多关于如何写好答案的信息in the help center
猜你喜欢
  • 1970-01-01
  • 2020-02-11
  • 2022-01-01
  • 2021-02-15
  • 2021-05-04
  • 1970-01-01
  • 1970-01-01
  • 2022-06-10
  • 2019-08-23
相关资源
最近更新 更多