[英]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: 为了让谷歌地图工作,我做了两件事:
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.