简体   繁体   English

找不到类'com.google.android.gms.location.internal.ParcelableGeofence',从方法glt.a引用

[英]Could not find class 'com.google.android.gms.location.internal.ParcelableGeofence', referenced from method glt.a

Everything was working ok, then suddenly eclipse started breaking asking for a perspective switch and going to debug mode with the error 'Link of class "Lcom/google/android/gms/location/internal/ParcelableGeoFence;" 一切都工作正常,然后突然eclipse开始打破要求透视切换并进入调试模式,错误'类链接“Lcom / google / android / gms / location / internal / ParcelableGeoFence;” failed. 失败。 Googling the problem lead nowhere. 谷歌搜索问题无处可去。 Debugger points to PathClassLoader(BaseDexClassLoader).findClass(String) line: 61 调试器指向PathClassLoader(BaseDexClassLoader).findClass(String)行:61
Strangely when I remove map.setMyLocationEnabled(true); 奇怪的是当我删除map.setMyLocationEnabled(true); from my code it no longer crashes but still I can see this in logcat 从我的代码它不再崩溃,但我仍然可以在logcat中看到这一点

E/dalvikvm(5639): Could not find class 'gpr', referenced from method gps.a
W/dalvikvm(5639): VFY: unable to resolve new-instance 4090 (Lgpr;) in Lgps;

here is full log: 这是完整的日志:

07-03 13:07:31.677: W/dalvikvm(5639): VFY: unable to resolve static method 24936: Lguj;.a 

(Landroid/content/Context;)Lgri;
07-03 13:07:31.697: E/dalvikvm(5639): Could not find class 'gpr', referenced from method gps.a
07-03 13:07:31.697: W/dalvikvm(5639): VFY: unable to resolve new-instance 4090 (Lgpr;) in Lgps;
07-03 13:07:31.697: E/dalvikvm(5639): Could not find class 'gpr', referenced from method gps.a
07-03 13:07:31.697: W/dalvikvm(5639): VFY: unable to resolve new-instance 4090 (Lgpr;) in Lgps;
07-03 13:07:31.697: E/dalvikvm(5639): Could not find class 'gpr', referenced from method gps.a
07-03 13:07:31.697: W/dalvikvm(5639): VFY: unable to resolve new-instance 4090 (Lgpr;) in Lgps;
07-03 13:07:31.707: I/Google Maps Android API(5639): Google Play services package version: 5084034
07-03 13:07:31.737: W/dalvikvm(5639): VFY: unable to resolve static field 20873 (t) in Lyp;
07-03 13:07:31.737: W/dalvikvm(5639): VFY: unable to resolve static field 20873 (t) in Lyp;
07-03 13:07:32.778: W/dalvikvm(5639): Link of class 'Lcom/google/android/gms/location/internal/ParcelableGeofence;' failed
07-03 13:07:32.778: E/dalvikvm(5639): Could not find class 'com.google.android.gms.location.internal.ParcelableGeofence', referenced from method glt.a
07-03 13:07:32.778: W/dalvikvm(5639): VFY: unable to resolve check-cast 2086 (Lcom/google/android/gms/location/internal/ParcelableGeofence;) in Lglt;
07-03 13:07:34.089: I/Adreno200-EGLSUB(5639): <ConfigWindowMatch:2078>: Format RGBA_8888.
07-03 13:07:34.319: D/LOCATION(5639): Connected
07-03 13:07:34.319: I/Adreno200-EGLSUB(5639): <ConfigWindowMatch:2089>: Format RGBX_8888.

The Issue is probably happening because the Map is not loaded and the app is trying to locate you in an unloaded Map. 问题可能正在发生,因为未加载地图并且应用程序试图在卸载的地图中找到您。 The Map is not loading with your api key or package name. 地图未加载您的API密钥或包名称。 I think your api key has got changed . 我认为你的api密钥已经改变了。 Please check your api key and package name. 请检查您的api密钥和包裹名称。

I did two things in order for google map to work: 为了让谷歌地图工作,我做了两件事:

  1. use the mapView instead of MapFragment or SupportMapFragment. 使用mapView而不是MapFragment或SupportMapFragment。
  2. if the map you implemented uses the user's current location, then you must check if the user have his location service enabled and implement your map based on that using a method 如果您实施的地图使用用户的当前位置,那么您必须检查用户是否启用了其位置服务,并使用方法实现基于该地图的地图

like so for example: 像这样的例子:

public boolean isLocationServiceEnabled() {
    LocationManager locationManager = (LocationManager) getActivity().getSystemService(Context.LOCATION_SERVICE);
    if(!locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER) && !locationManager.isProviderEnabled(LocationManager.NETWORK_PROVIDER)) {
            //All location services are disabled
        return false;
    }
    return true;
}

For new visitors, if your code and api key are okay then please check if your device has internet connection. 对于新访问者,如果您的代码和API密钥没问题,请检查您的设备是否有互联网连接。 Because I forgot the switch on internet then I got same error. 因为我忘了互联网上的开关然后我得到了同样的错误。

For me setting Eclipse's Preferences -> Android -> Build -> Custom keystore fixed the problem. 对我来说,设置Eclipse的首选项 - > Android - > Build - > Custom keystore修复了问题。 Also uninstall app and clean build. 还卸载应用程序并清理构建。

暂无
暂无

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

相关问题 找不到方法glt.a引用的类&#39;com.google.android.gms.location.internal.ParcelableGeofence - Could not find class 'com.google.android.gms.location.internal.ParcelableGeofence referenced from method glt.a Android:找不到方法glt.a所引用的类&#39;com.google.android.gms.location.internal.ParcelableGeofence - Android: Could not find class 'com.google.android.gms.location.internal.ParcelableGeofence referenced from method glt.a 找不到方法gls.a引用的类“ com.google.android.gms.location.internal.ParcelableGeofence” - Could not find class 'com.google.android.gms.location.internal.ParcelableGeofence', referenced from method gls.a 找不到类&#39;com.google.android.gms.location.internal.ParcelableGeofence - Could not find class 'com.google.android.gms.location.internal.ParcelableGeofence ClassNotFoundException:带有Maps APIv2的com.google.android.gms.location.internal.ParcelableGeofence - ClassNotFoundException: com.google.android.gms.location.internal.ParcelableGeofence with Maps APIv2 找不到方法com.xxx.xxx.MainActivity.onCreate引用的类“ com.google.android.gms.ads.AdView” - Could not find class 'com.google.android.gms.ads.AdView', referenced from method com.xxx.xxx.MainActivity.onCreate 获取错误:无法找到类com.google.android.gms.common.GooglePlayServicesUtil.zza引用的类&#39;android.app.AppOpsManager&#39; - Getting error: Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zza 找不到方法com.google.android.gms.common.kf.a引用的类“ android.app.AppOpsManager” - Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.common.kf.a 找不到类&#39;android.app.AppOpsManager&#39;,引自com.google.android.gms.common.GooglePlayServicesUtil.zza方法 - Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zza com.google.android.gms.internal.zzhu:找不到引用的类android.security.NetworkSecurityPolicy - com.google.android.gms.internal.zzhu: can't find referenced class android.security.NetworkSecurityPolicy
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM