Could not find class 'com.google.android.gms.location.internal.ParcelableGeofence', referenced from method glt.a
Asked Answered
I

4

15

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;" failed. Googling the problem lead nowhere. Debugger points to PathClassLoader(BaseDexClassLoader).findClass(String) line: 61
Strangely when I remove map.setMyLocationEnabled(true); from my code it no longer crashes but still I can see this in 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.
Intended answered 3/7, 2014 at 9:23 Comment(0)
N
1

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. I think your api key has got changed . Please check your api key and package name.

Natishanative answered 4/7, 2014 at 7:0 Comment(9)
no that's not the case, no matter when I call map.setMyLocationEnabled(true); also api key was not changed. I even reverted the code for few days via git but still no luck, I guess it is something related to adt.Intended
Did u do an eclipse update? Coz that will change ur sha1 code. And hence your api key wud need to be changed.Natishanative
no I didn't, but still I created new map api key, unfortunately no luck. Strange thing is that application works after that errorIntended
Even i have the same issue so i generated new API key and pasted in manifest file but when i go to debug mode and start the application this same error comes. And my home page is map so it is not loading map. But without debug mode if u run app it works fine.Cercus
Check if the sha1 code of yor eclipse matches the code you pasted on google consoleNatishanative
@Mr.Hyde not yet, I would post solutionIntended
@VilenMelkumyan Unfortunately i have your problem too and i don't know the solution! But i know it's happen to me after move my map from FragmentActivity to Fragment in a ViewPager! And every situation about API KEY changes that discussed not happened to me.Lucilucia
I am facing exactly the same problem. But the problem is device specific. As the app is working fine on other devices then on a particular deviceBosanquet
it is a device generic issue..I tries in my Nexus 7 and the error persisted whereas while it tries in Moto E everything was working smoothlyCageling
M
0

I did two things in order for google map to work:

  1. use the mapView instead of MapFragment or 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;
}
Marcela answered 12/9, 2014 at 15:45 Comment(0)
K
-1

For new visitors, if your code and api key are okay then please check if your device has internet connection. Because I forgot the switch on internet then I got same error.

Kellie answered 18/9, 2014 at 7:16 Comment(2)
C'mon, you think that I am debugging map app without internet connection or invalid api key ? and so many people have same issue ?Intended
That answer for developer who debugging map app without internet connection because we are human so MAYBE we can forget to open internet connection when we debugging. That answer is just an ADVICE TO CHECK MAYBE CONNECTION IS NOT OKKellie
R
-2

For me setting Eclipse's Preferences -> Android -> Build -> Custom keystore fixed the problem. Also uninstall app and clean build.

Retrospection answered 21/8, 2014 at 12:46 Comment(1)
tried it, created new custom key, then google api key based on custom keystore, uninstalled the project from device, cleaned workspace, but no change, anyway thanks for helpIntended

© 2022 - 2024 — McMap. All rights reserved.