I did al procedure to add google maps api but i am getting this errors. Sorry for bad language.
09 12:20:55.359: W/dalvikvm(5918): Unable to resolve superclass of Lmaps/a/du; (406)
01-09 12:20:55.359: W/dalvikvm(5918): Link of class 'Lmaps/a/du;' failed
01-09 12:20:55.359: W/dalvikvm(5918): Unable to resolve superclass of Lmaps/a/ej; (2358)
01-09 12:20:55.359: W/dalvikvm(5918): Link of class 'Lmaps/a/ej;' failed
01-09 12:20:55.359: W/dalvikvm(5918): Unable to resolve superclass of Lmaps/j/k; (2374)
01-09 12:20:55.359: W/dalvikvm(5918): Link of class 'Lmaps/j/k;' failed
01-09 12:20:55.359: E/dalvikvm(5918): Could not find class 'maps.j.k', referenced from method maps.y.ae.a
01-09 12:20:55.359: W/dalvikvm(5918): VFY: unable to resolve new-instance 3566 (Lmaps/j/k;) in Lmaps/y/ae;
Here its the manifest.xml
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="com.comparto.piso.permission.MAPS_RECEIVE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<permission
android:name="com.comparto.piso.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<application
........ >
<uses-library android:name="com.google.android.maps" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="api key" />
......
.....
In java code i extends FragmentActivity and here its the onCreate code
GooglePlayServicesUtil
.isGooglePlayServicesAvailable(getApplicationContext());
GoogleMap map = ((SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map)).getMap();
if (map != null) {
map.setMapType(GoogleMap.MAP_TYPE_NORMAL);
}
here its the layout xml
<fragment
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/map"
android:layout_width="fill_parent"
android:layout_height="300px"
class="com.google.android.gms.maps.SupportMapFragment" />
All the "Unable to resolve superclass xxxx" and "Link of class xxxx failed" from Dalvik in the logcat is normal if your device is not on the same API level as the one used by the Google Maps library.
You should check whether you are getting an authorization failure instead by using this command:
adb logcat | grep Maps
If you see something like this:
E/Google Maps Android API(): Authorization failure.
Then it would mean that you are not supplying the correct API key in your manifest. Check again in your Google API Console (in the API Access section) whether you have added the correct fingerprint and package name pair as described in the guide.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With