1
我收到一個異常提及添加元數據,但即使添加它,我仍然接受相同的異常。你能幫我解我嗎?Android,java.lang.IllegalStateException
01-08 20:22:05.380: E/AndroidRuntime(2335): Caused by: java.lang.IllegalStateException:
The meta-data tag in your app's AndroidManifest.xml does not have the right value.
Expected 4030500 but found 0. 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" />
由於這是在這裏希望你能看到我的AndroidManifest是
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.googlemapv2"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<!-- The following two permissions are not required to use
Google Maps Android API v2, but are recommended. -->
<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:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.googlemapv2.MainActivity"
android:label="@string/app_name" >
<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="AIzaSyColV0vSkdC8PmLLy4DiqiK-p-gXzUo-Ng"/>
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
</application>
</manifest>
你可以發佈你的AndroidManifest.xml文件嗎? – Vinnie
嘗試添加您的標籤下的以下 <元數據 機器人:名字=「com.google.android.gms.version」 機器人:值=「@整數/ GOOGLE_PLAY_SERVICES_VERSION」 /> –
清潔項目,刪除從你的手機應用程序,然後再試一次 –