这个应用程序将无法运行,除非你更新谷歌播放服务(通过集市) [英] This app won't run unless you update Google Play Services (via Bazaar)

查看:158
本文介绍了这个应用程序将无法运行,除非你更新谷歌播放服务(通过集市)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我测试了新的谷歌地图API V2为Android,而我得到这个消息时,应用程序启动:

I'm testing out the new Google Maps API V2 for Android, and I'm getting this message when the app launches:

这是一个4.1模拟器上运行。

下面是我的的Andr​​oidManifest.xml 文件:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.maptest"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="15" />

    <permission
        android:name="com.example.maptest.permission.MAPS_RECEIVE"
        android:protectionLevel="signature"/>
    <uses-permission android:name="com.example.maptest.permission.MAPS_RECEIVE"/>
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

    <!-- Require OpenGL ES version 2 -->
    <uses-feature
          android:glEsVersion="0x00020000"
          android:required="true"/>

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >

        <activity
            android:name=".MainActivity"
            android:label="@string/title_activity_main" >
            <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="##myapikey##"/>

    </application>
</manifest>

文件MainActivity.java:

File MainActivity.java:

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;
    }
}

文件activity_main.xml

File activity_main.xml

<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" >

    <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"/>
</RelativeLayout>

点击更新崩溃与下面的堆栈跟踪应用程序:

Clicking "Update" crashes the app with the following stacktrace:

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)

我还引用了谷歌播放服务项目。我在做什么错在这里?

I've also referenced the Google Play Services project. What am I doing wrong here?

推荐答案

根据带的 Android开发讨论在Google+上,运行模拟器上的新的地图API是不可能的时刻。

According to a discussion with Android Developers on Google+, running the new Map API on the emulator is not possible at the moment.

(注释昨日从Zhelyazko·阿塔纳索夫在23:18,我不知道如何直接链接到它)

(The comment is from Zhelyazko Atanasov yesterday at 23:18, I don't know how to link directly to it)

另外,你不从实际设备运行时,看到(通过集市)的一部分,并更新按钮打开Play商店。我假设集市是为了提供谷歌播放服务的Andr​​oid模拟器,但还没有准备好......

Also, you don't see the "(via Bazaar)" part when running from an actual device, and the update button open the Play Store. I am assuming Bazaar is meant to provide Google Play Services on the Android emulator, but it is not ready yet...

这篇关于这个应用程序将无法运行,除非你更新谷歌播放服务(通过集市)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆