简体   繁体   English

没有 static 方法“Lcom/google/android/gms/common/GooglePlayServicesUtil;.isGooglePlayServicesAvailable(Landroid/content/Context;)I”

[英]no static method "Lcom/google/android/gms/common/GooglePlayServicesUtil;.isGooglePlayServicesAvailable(Landroid/content/Context;)I"

I'm updating a Xamarin Forms Maps App.我正在更新 Xamarin Forms 地图应用程序。 I'm currently experiencing this error:我目前遇到此错误:

no static method "Lcom/google/android/gms/common/GooglePlayServicesUtil;.isGooglePlayServicesAvailable(Landroid/content/Context;)I"

It happens on this line within the MainActivity class:它发生在 MainActivity class 中的这一行:

Xamarin.FormsMaps.Init(this, bundle);

I currently have proguard configured to keep the GooglePlayServicesUtil class:我目前配置了混淆器以保留 GooglePlayServicesUtil class:

-keep public class com.google.android.gms.common.GooglePlayServicesUtil

Here are my Android Nuget packages:这是我的 Android Nuget 包:

在此处输入图像描述

Here is my Android project config:这是我的 Android 项目配置:

在此处输入图像描述

Any help would be much appreciated.任何帮助将非常感激。

I had to manually edit the project file to disable the multi-dex functionality.我不得不手动编辑项目文件以禁用 multi-dex 功能。 Disabling multi-dex and removing the code shrinker from the project properties did not do the trick.禁用 multi-dex 并从项目属性中删除代码收缩器并没有达到目的。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法解析静态方法:Lcom / google / android / gms / common / GooglePlayServicesUtil; .isGooglePlayServicesAvailable - unable to resolve static method: Lcom/google/android/gms/common/GooglePlayServicesUtil;.isGooglePlayServicesAvailable 类 Lcom/google/android/gms/common/internal/Preconditions 中没有静态方法 checkHandlerThread(Landroid/os/Handler;Ljava/lang/String;)V - No static method checkHandlerThread(Landroid/os/Handler;Ljava/lang/String;)V in class Lcom/google/android/gms/common/internal/Preconditions java.lang.NoClassDefFoundError:解析失败:Lcom / google / android / gms / common / GooglePlayServicesUtil - java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/GooglePlayServicesUtil 无法找到com.google.android.gms.common.GooglePlayServicesUtil方法 - Could not find method com.google.android.gms.common.GooglePlayServicesUtil java.lang.NoSuchMethodError:类Lcom / google / android / gms / common / util / zzu中没有静态方法; - java.lang.NoSuchMethodError: No static method in class Lcom/google/android/gms/common/util/zzu; java.lang.NoSuchMethodError: 没有静态方法 with(Landroid/content/Context;)Lcom/squareup/picasso/Picasso; - java.lang.NoSuchMethodError: No static method with(Landroid/content/Context;)Lcom/squareup/picasso/Picasso; NoClassDefFoundError:设备上的com.google.android.gms.common.GooglePlayServicesUtil - NoClassDefFoundError: com.google.android.gms.common.GooglePlayServicesUtil on device NoClassDefFoundError:com.google.android.gms.common.GooglePlayServicesUtil - NoClassDefFoundError: com.google.android.gms.common.GooglePlayServicesUtil java.lang.NoSuchMethodError:没有静态方法getDrawable(Landroid / content / Context; I)Landroid / graphics / drawable / Drawable; - java.lang.NoSuchMethodError: No static method getDrawable(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable; 找不到类'android.app.AppOpsManager',引自com.google.android.gms.common.GooglePlayServicesUtil.zza方法 - Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zza
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM