这个应用程序将无法运行,除非你更新谷歌播放服务错误 [英] This app won't run unless you update Google Play services error

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

问题描述

我迷路了现在。 我实施使用谷歌地图Android应用程序。

I'm kind of lost right now. I'm implementing an Android application using Google maps.

为了使工作我跟着一些教程,这是pretty的效率。但是我坚持用这个:

In order to make it work I followed some tutorials which were pretty efficient. However I'm stuck with this ":

要解决这个问题,我发现了一些窍门这里或<一href="http://nemanjakovacevic.net/blog/english/2012/12/06/how-to-make-android-google-maps-v2-work-in-android-emulator/">here它告诉要解决这个问题,你必须采取模拟器一个特殊的配置,这里是我的:

To fix, this problem I found some tricks here or here which tell that to solve this issue you have to take a special configuration for the emulator, here is mine:

和仿真器上安装一些apk文件。

and to install some .apk on the emulator.

和魔术是应该做的,地图是应该出现这不是我的情况。

And the magic is supposed to be done and the map is supposed to appear which is not my case.

我检查,我的临时演员都安装好:

I checked that my extras were well installed:

下面是我的Andr​​oidManifest:

Here is my AndroidManifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="mypack"
          android:versionCode="1"
          android:versionName="1.0">

    <uses-sdk android:minSdkVersion="16"/>

    <permission android:name="mypack.permission.MAPS_RECEIVE"
                android:protectionLevel="signature"/>
    <uses-permission android:name="mypack.permission.MAPS_receive"/>

    <!-- Permission pour utiliser la connexion internet -->
    <uses-permission android:name="android.permission.INTERNET" />
    <!-- Permission permettant de vérifier l'état de la connexion -->
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <!-- Permission pour stocker des données en cache de la map -->
    <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:label="@string/app_name" android:icon="@drawable/ic_launcher">
        <meta-data
                android:name="com.google.android.maps.v2.API_KEY"
                android:value="MYKEY" />

        <meta-data android:name="com.google.android.gms.version"
                   android:value="@integer/google_play_services_version" />

        <activity android:name="Home"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
    </application>

</manifest>

下面是我的MainActivity

Here is my MainActivity

import android.app.Activity;
import android.os.Bundle;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.MapFragment;

public class Home extends Activity {
    /**
     * Called when the activity is first created.
     */
    private GoogleMap map;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        map = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();
    }
}

和相应的布局:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:orientation="vertical"
              android:layout_width="fill_parent"
              android:layout_height="fill_parent"
        >
    <fragment xmlns:android="http://schemas.android.com/apk/res/android"
              android:id="@+id/map"
              android:name="com.google.android.gms.maps.MapFragment"
              android:layout_width="match_parent"
              android:layout_height="match_parent" />
</LinearLayout>

希望能找到一些补丁还是什么我错过了这里,谢谢大家提前。

Hope to find some fix or what I missed here, thank you in advance.

推荐答案

在Android的SDK管理器,您必须安装谷歌的API(x86的系统图像)下的Android 4.4.2(API 19)。退出Eclipse和重新启动。

In the Android SDK Manager, you must install "Google APIs (x86 System Image)" under "Android 4.4.2 (API 19)". Quit Eclipse and restart it.

然后创建AVD管理一个新的Andr​​oid虚拟设备,然后选择谷歌API的86(谷歌公司) - API级别19为目标。选中使用主机GPU,以确保地图的绘制将加快。

Then create a new android virtual device in AVD manager and choose "Google APIs x86 (Google Inc.) - API Level 19" as target. Check "Use Host GPU" to ensure the drawing of the map will be accelerated.

就这样,这个新的模拟器将播放业务preinstalled,它会运行得更快,因为它是一个x86的形象。

That's it, this new emulator will have Play Services preinstalled and it will run faster because it's a x86 image.

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

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