I am trying my 1st google maps app. and i followed all the steps in tutorial of vogella http://www.vogella.com/articles/AndroidGoogleMaps/article.html.
I created a api key and used the same in manifest file.
Declared all the permissions in manifest file.
While i run on phone, app works fine but when i try to run on emulator i get only empty screen with zoom-icons and in error console i get
06-25 06:06:54.387: E/Google Maps Android API(7808): Google Maps Android API v2 only supports devices with OpenGL ES 2.0 and above
I am trying to run on emulator with google api 4.2.2.
Manifest file
<permission
android:name="com.sample.maps.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="false" />
<uses-permission android:name="com.sample.maps.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" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.sample.maps.Presentlocation"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<uses-library android:name="com.google.android.maps" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyD0Ku3-ysyNupHy59CtfvX6Cfmz_ob0pkk"/>
</application>
XML file
<fragment
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:name="com.google.android.gms.maps.MapFragment"
/>
Java file
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.presentlocation);
}
Whats the mistake i am doing?
Thanks:)