I am trying to implement Google maps using the new google api v2 maps, and for some reason I cannot see the map.
I think the problem is that these two lines of error when I run it on the emulator:
E/ActivityThread( 1373): Failed to find provider info for com.google.settings E/ActivityThread( 1373): Failed to find provider info for com.google.android.gsf .gservices
when I run the application on the device, the following error occurs:
Could not find class 'maps.j.k', referenced from method map.y.ae.a
My problem looks the same as in this link: http://android-er.blogspot.co.il/2012/12/google-maps-android-api-v2-with-blank.html
It says that the problem can be my key, so I went and reproduced it using the following tutorial: http://android-er.blogspot.co.il/2012/12/displaying-sha1-certificate-fingerprint.html . but it still didn't help me.
Support files, of course, are added to the project, as well as to the Google Play services library. I see the same result on the emulator (after manually adding two files that allow the go2 v2 card to be used on the emulator), as well as on Motorola Defy running Android 2.2.
Maybe I'm using the wrong debug.keystore? I use the one that is in the User.android folder. If so, how do I find the file I need?
EDIT: my eclipse says my debug key is in the default folder. So I renamed the debug.keystore file and ran Eclipse to recreate it again and again. This led to the creation of a new SHA1 key. I used it to create a new Google Maps API v2 key, but the result is still the same. I still can not see the map.
EDIT2: Stupid, I chose Google Map API V2 instead of Google Maps Android API V2. This question can be closed. Thanks.
Here are all the code files:
XML:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <fragment xmlns:map="http://schemas.android.com/apk/res-auto" android:id="@+id/map" android:name="com.google.android.gms.maps.SupportMapFragment" android:layout_width="match_parent" android:layout_height="match_parent" map:cameraBearing="112.5" map:cameraTargetLat="-33.796923" map:cameraTargetLng="150.922433" map:cameraTilt="30" map:cameraZoom="13" map:mapType="normal" map:uiCompass="false" map:uiRotateGestures="true" map:uiScrollGestures="false" map:uiTiltGestures="true" map:uiZoomGestures="true" /> </LinearLayout>
Map Fragmentation Class:
package com.eadesign.skygiraffefinalv2; import com.google.android.gms.common.GooglePlayServicesUtil; import com.google.android.gms.maps.GoogleMap; import android.os.Bundle; import com.google.android.gms.maps.*; import android.widget.ImageView; import android.widget.TextView; public class Map extends android.support.v4.app.FragmentActivity { private GoogleMap map; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.map); if (GooglePlayServicesUtil.isGooglePlayServicesAvailable(getApplicationContext()) == 0) { map = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMap();
manifest file:
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.eadesign.skygiraffefinalv2" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17"/> <permission android:name="com.eadesign.skygiraffefinalv2.permission.MAPS_RECEIVE" android:protectionLevel="signature"/> <uses-permission android:name="com.eadesign.skygiraffefinalv2.permission.MAPS_RECEIVE"/> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <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" /> <uses-feature android:glEsVersion="0x00020000" android:required="true"/> <application android:allowBackup="true" android:icon="@drawable/sgicon90" android:label="@string/app_name" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"> <activity android:name=".Map" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="My key"/> </application>
log from logcat:
ent.category.LAUNCHER] flg=0x10000000 cmp=com.eadesign.skygiraffefinalv2/.Map u= 0} from pid 1362 W/WindowManager( 148): Failure taking screenshot for (246x410) to layer 21010 D/AndroidRuntime( 1362): Shutting down VM I/ActivityManager( 148): Start proc com.eadesign.skygiraffefinalv2 for activity com.eadesign.skygiraffefinalv2/.Map: pid=1373 uid=10046 gids={3003, 1015, 1028} D/dalvikvm( 1373): Not late-enabling CheckJNI (already on) D/dalvikvm( 1362): GC_CONCURRENT freed 99K, 77% free 483K/2048K, paused 1ms+1ms, total 13ms D/jdwp ( 1362): Got wake-up signal, bailing out of select D/dalvikvm( 1362): Debugger has detached; object registry had 1 entries E/jdwp ( 1373): Failed sending reply to debugger: Broken pipe D/dalvikvm( 1373): Debugger has detached; object registry had 2 entries E/Trace ( 1373): error opening trace file: No such file or directory (2) D/dalvikvm( 1373): GC_CONCURRENT freed 204K, 3% free 8264K/8519K, paused 89ms+6m s, total 161ms D/dalvikvm( 1373): WAIT_FOR_CONCURRENT_GC blocked 33ms E/ActivityThread( 1373): Failed to find provider info for com.google.settings E/ActivityThread( 1373): Failed to find provider info for com.google.settings D/dalvikvm( 1373): GC_CONCURRENT freed 312K, 5% free 8471K/8839K, paused 82ms+10 5ms, total 268ms E/ActivityThread( 1373): Failed to find provider info for com.google.android.gsf .gservices E/ActivityThread( 1373): Failed to find provider info for com.google.android.gsf .gservices D/dalvikvm( 1373): GC_CONCURRENT freed 227K, 4% free 8797K/9095K, paused 91ms+11 0ms, total 300ms D/libEGL ( 1373): Emulator without GPU support detected. Fallback to software r enderer. I/Choreographer( 1373): Skipped 54 frames! The application may be doing too muc h work on its main thread. D/gralloc_goldfish( 1373): Emulator without GPU emulation detected. D/libEGL ( 1373): loaded /system/lib/egl/libGLES_android.so I/ActivityManager( 148): Displayed com.eadesign.skygiraffefinalv2/.Map: +3s545ms I/Choreographer( 1373): Skipped 75 frames! The application may be doing too muc h work on its main thread.