谷歌地图V2 IllegalStateException

时间:2014-01-25 13:35:19

标签: android google-maps google-maps-android-api-2 google-play-services

我有这个非常奇怪的错误,我的应用程序在我启动它的那一刻崩溃了。 调用堆栈是:

01-25 15:10:52.264: E/AndroidRuntime(13707): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.out.goout/com.out.goout.Splash}: java.lang.IllegalStateException:The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 4030500 but found 4132500. You must have the following declaration within the <application> element: <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />

问题是我确实有堆栈跟踪中解释的标签,我的google play服务版本是14

我的清单中的代码是:

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

    <uses-sdk
        android:minSdkVersion="10"
        android:targetSdkVersion="17" />

    <uses-permission android:name="com.out.goout.permission.MAPS_RECEIVE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <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" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.VIBRATE" />

    <permission
        android:name="com.out.goout.permission.MAPS_RECEIVE"
        android:protectionLevel="signature" >
    </permission>

    <uses-feature
        android:glEsVersion="0x00020000"
        android:required="true" />

    <application
        android:name="com.out.App"
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="false"
        android:theme="@style/Theme.Sherlock.Light.DarkActionBar" >

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

        <uses-library
            android:name="com.google.android.maps"
            android:required="true" />

        <meta-data
            android:name="com.google.android.maps.v2.API_KEY"
            android:value="my key" />

        <activity
             ...
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
             ...
        </activity>
        <activity
             ...
        </activity>
        <activity
             ...
        </activity>
        <activity
             ...
        </activity>
    </application>

</manifest>

非常需要你的帮助

2 个答案:

答案 0 :(得分:0)

从清单中删除此行:

<uses-library
            android:name="com.google.android.maps"
            android:required="true" />

答案 1 :(得分:0)

最后我得到了...... 我启动了一个新的android项目并替换android-support-v4.jar文件清理项目并且它有所帮助! 非常感谢Zohra Khan的帮助