谷歌地图显示空白,应用程序抛出“无法找到方法”例外

问题描述 投票:0回答:1

我将谷歌地图V2与我的应用程序集成,它工作得非常好。我从今天开始面对这个问题 - 未找到方法的例外情况和空白方格屏幕而不是地图。请让我知道如何解决这个问题,感谢您的帮助。

04-25 01:48:47.711: I/dalvikvm(28543): Could not find method android.app.Notification$Builder.setLocalOnly, referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zza
04-25 01:48:47.711: W/dalvikvm(28543): VFY: unable to resolve virtual method 332: Landroid/app/Notification$Builder;.setLocalOnly (Z)Landroid/app/Notification$Builder;
04-25 01:48:47.711: D/dalvikvm(28543): VFY: replacing opcode 0x6e at 0x00c2
04-25 01:48:47.711: I/dalvikvm(28543): Could not find method android.app.AppOpsManager.checkPackage, referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zza
04-25 01:48:47.711: W/dalvikvm(28543): VFY: unable to resolve virtual method 203: Landroid/app/AppOpsManager;.checkPackage (ILjava/lang/String;)V
04-25 01:48:47.711: D/dalvikvm(28543): VFY: replacing opcode 0x6e at 0x0010
04-25 01:48:47.711: I/dalvikvm(28543): Could not find method android.content.pm.PackageManager.getPackageInstaller, referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zzh
04-25 01:48:47.711: W/dalvikvm(28543): VFY: unable to resolve virtual method 635: Landroid/content/pm/PackageManager;.getPackageInstaller ()Landroid/content/pm/PackageInstaller;
04-25 01:48:47.711: D/dalvikvm(28543): VFY: replacing opcode 0x6e at 0x000b
04-25 01:48:47.721: I/zzy(28543): Making Creator dynamically
04-25 01:48:47.751: I/dalvikvm(28543): Could not find method android.app.Notification$Builder.setLocalOnly, referenced from method com.google.android.gms.common.os.b
04-25 01:48:47.751: W/dalvikvm(28543): VFY: unable to resolve virtual method 142: Landroid/app/Notification$Builder;.setLocalOnly (Z)Landroid/app/Notification$Builder;
android google-maps
1个回答
0
投票

现在的问题是,如果API密钥正确,我会得到一个空白屏幕,如果我故意导致错误的密钥,则会出现身份验证错误

如果您拥有正确的API密钥,可以尝试以下内容:

  1. 启用Manifest上的权限。 <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
  2. 确保您在清单中提供了正确的软件包名称以及GDC中的SHA1证书指纹。
  3. 将Google Maps API设置为已启用。

希望有所帮助。

© www.soinside.com 2019 - 2024. All rights reserved.