Note that there are some explanatory texts on larger screens.

plurals
  1. POThis app won't run unless you update Google Play Services (via Bazaar)
    text
    copied!<p>I'm testing out the new Google Maps API V2 for Android, and I'm getting this message when the app launches:</p> <p><img src="https://i.stack.imgur.com/l8aX7.png" alt="MainActivity showing error message"></p> <p><em>This is running on an 4.1 emulator.</em></p> <p>Here is my <code>AndroidManifest.xml</code> file:</p> <pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.maptest" android:versionCode="1" android:versionName="1.0" &gt; &lt;uses-sdk android:minSdkVersion="8" android:targetSdkVersion="15" /&gt; &lt;permission android:name="com.example.maptest.permission.MAPS_RECEIVE" android:protectionLevel="signature"/&gt; &lt;uses-permission android:name="com.example.maptest.permission.MAPS_RECEIVE"/&gt; &lt;uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/&gt; &lt;uses-permission android:name="android.permission.INTERNET"/&gt; &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/&gt; &lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/&gt; &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/&gt; &lt;!-- Require OpenGL ES version 2 --&gt; &lt;uses-feature android:glEsVersion="0x00020000" android:required="true"/&gt; &lt;application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" &gt; &lt;activity android:name=".MainActivity" android:label="@string/title_activity_main" &gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.MAIN" /&gt; &lt;category android:name="android.intent.category.LAUNCHER" /&gt; &lt;/intent-filter&gt; &lt;/activity&gt; &lt;meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="##myapikey##"/&gt; &lt;/application&gt; &lt;/manifest&gt; </code></pre> <p>File MainActivity.java:</p> <pre><code>public class MainActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.activity_main, menu); return true; } } </code></pre> <p>File activity_main.xml</p> <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" &gt; &lt;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.MapFragment"/&gt; &lt;/RelativeLayout&gt; </code></pre> <p>Clicking "Update" crashes the app with the following stacktrace:</p> <pre><code>E/Trace(1034): error opening trace file: No such file or directory (2) W/GooglePlayServicesUtil(1034): Google Play services out of date. Requires 2010100 but found 1 W/GooglePlayServicesUtil(1034): Google Play services out of date. Requires 2010100 but found 1 W/GooglePlayServicesUtil(1034): Google Play services out of date. Requires 2010100 but found 1 W/GooglePlayServicesUtil(1034): Google Play services out of date. Requires 2010100 but found 1 W/GooglePlayServicesUtil(1034): Google Play services out of date. Requires 2010100 but found 1 W/GooglePlayServicesUtil(1034): Google Play services out of date. Requires 2010100 but found 1 D/gralloc_goldfish(1034): Emulator without GPU emulation detected. D/AndroidRuntime(1034): Shutting down VM W/dalvikvm(1034): threadid=1: thread exiting with uncaught exception (group=0x40a13300) E/AndroidRuntime(1034): FATAL EXCEPTION: main E/AndroidRuntime(1034): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=http://play.google.com/store/apps/details? \ id=com.google.android.apps.bazaar flg=0x80000 pkg=com.android.vending } E/AndroidRuntime(1034): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1545) E/AndroidRuntime(1034): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1416) E/AndroidRuntime(1034): at android.app.Activity.startActivityForResult(Activity.java:3351) E/AndroidRuntime(1034): at android.app.Activity.startActivityForResult(Activity.java:3312) E/AndroidRuntime(1034): at android.app.Activity.startActivity(Activity.java:3522) E/AndroidRuntime(1034): at android.app.Activity.startActivity(Activity.java:3490) E/AndroidRuntime(1034): at com.google.android.gms.internal.c$2.onClick(Unknown Source) E/AndroidRuntime(1034): at android.view.View.performClick(View.java:4084) E/AndroidRuntime(1034): at android.view.View$PerformClick.run(View.java:16966) E/AndroidRuntime(1034): at android.os.Handler.handleCallback(Handler.java:615) E/AndroidRuntime(1034): at android.os.Handler.dispatchMessage(Handler.java:92) E/AndroidRuntime(1034): at android.os.Looper.loop(Looper.java:137) E/AndroidRuntime(1034): at android.app.ActivityThread.main(ActivityThread.java:4745) E/AndroidRuntime(1034): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime(1034): at java.lang.reflect.Method.invoke(Method.java:511) E/AndroidRuntime(1034): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) E/AndroidRuntime(1034): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) E/AndroidRuntime(1034): at dalvik.system.NativeStart.main(Native Method) </code></pre> <p>I've also referenced the Google Play Services project. What am I doing wrong here?</p> <p><strong>UPDATE</strong></p> <p>The corresponding bug in Google issue tracker (<a href="https://issuetracker.google.com/issues/35822258" rel="nofollow noreferrer">https://issuetracker.google.com/issues/35822258</a>) was solved some time ago.</p> <p>Now you can use Google Maps Android API in emulator and create Virtual devices with Play services as described in this answer:</p> <p><a href="https://stackoverflow.com/a/46246782/5140781">https://stackoverflow.com/a/46246782/5140781</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload