Reputation: 783
I want to display Google Map APIv2 in an emulator. It seems to me that I've done everything according to official Google tutorial and this tutorial. I see "+" and "-" buttons to adjust zoom, but don't see the map. I've tried to regenerate keystore and provide another api key, but this had no effect. The only guess I have is that eclipse signs my application with a debug key, though I've done export procedure from my keystore.
Or may be it's somehow jdk issue? I have jdk 1.7 installed, and android uses 1.6
Here are the errors that I get:
E/Trace(681): error opening trace file: No such file or directory (2)
E/ActivityThread(681): Failed to find provider info for com.google.settings
E/ActivityThread(681): Failed to find provider info for com.google.settings
E/ActivityThread(681): Failed to find provider info for com.google.android.gsf.gservices
E/ActivityThread(681): Failed to find provider info for com.google.android.gsf.gservices
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="us.irz.findme"
android:versionCode="1"
android:versionName="1.0" >
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<uses-sdk
android:minSdkVersion="12"
android:targetSdkVersion="17" />
<permission
android:name="us.irz.findme.permission.MAPS_RECEIVE"
android:protectionLevel="signature"/>
<uses-permission android:name="us.irz.findme.permission.MAPS_RECEIVE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="us.irz.findme.LoginActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="us.irz.findme.DeviceActivity"></activity>
<activity android:name="us.irz.findme.MapActivity"></activity>
<activity android:name="us.irz.findme.TabsActivity"></activity>
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="my_api_key"/>
</application>
</manifest>
map.xml file
<?xml version="1.0" encoding="utf-8"?>
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.SupportMapFragment"/>
MainActivity.java
public class MainActivity extends FragmentActivity implements OnClickListener {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.map);
}
...
}
Upvotes: 1
Views: 5156
Reputation: 2740
If you like to try it in a emulator, the emulator has to be created as with target Google Api level xx, not with Android 2.3 (for example), Sometimes the emulator can't load the map, so I recomended you to use a real Android device, your phone, tablet or something like this... Too check that the api key is the correct.. If you know spanish, can follow this tuto, is very good http://www.sgoliver.net/blog/?page_id=3011, search the section "Mapas en Android (Google Maps Android API v2) – I"...
Upvotes: 1
Reputation: 23638
Please check that you added the Google Play Services
library in you project.
Upvotes: 0