在AndroidManifest.xml中的元数据标签没有正确的价值 [英] The meta data tag in AndroidManifest.xml does not have the right value
问题描述
我在尝试运行应用程序时,这个错误:
产生的原因:java.lang.IllegalStateException:在应用的AndroidManifest.xml中的元数据标签没有正确的价值。预计7095000但发现6587000.您必须在应用程序元素中声明如下:
<元数据机器人:名字=com.google.android.gms.version机器人:值=@整数/ GOOGLE_PLAY_SERVICES_VERSION/>
不过,code的那条线是我对不起清单仍然在小白的Android
<?XML版本=1.0编码=UTF-8&GT?;
<清单的xmlns:机器人=http://schemas.android.com/apk/res/android
包=com.topgame.blackjackgfree1
安卓版code =2
机器人:=的versionName1.0> <采用-SDK安卓的minSdkVersion =10/>
<使用特征的android:glEsVersion =0x00020000/> <使用许可权的android:NAME =com.android.vending.BILLING/>
<使用许可权的android:NAME =android.permission.INTERNET对/>
<使用许可权的android:NAME =android.permission.ACCESS_NETWORK_STATE/>
<使用许可权的android:NAME =android.permission.ACCESS_WIFI_STATE/>
<使用许可权的android:NAME =android.permission.WRITE_EXTERNAL_STORAGE/>
<使用许可权的android:NAME =android.permission.READ_PHONE_STATE/>
<使用许可权的android:NAME =android.permission.GET_ACCOUNTS/>
<使用许可权的android:NAME =android.permission.ACCESS_COARSE_LOCATION/> <支持屏安卓xlargeScreens =真
机器人:largeScreens =真
机器人:smallScreens =真
机器人:anyDensity =真
机器人:normalScreens =真/> <应用机器人:标签=@字符串/ APP_NAME
机器人:图标=@绘制/图标
机器人:hardwareAccelerated =真
机器人:allowBackup =真
> <元数据机器人:名字=com.google.android.gms.games.APP_ID
机器人:值=@字符串/ APP_ID/>
<元数据机器人:名字=com.google.android.gms.version
机器人:值=@整数/ GOOGLE_PLAY_SERVICES_VERSION/> <活动机器人:名字=com.topgame.test.MainActivity
机器人:标签=@字符串/ APP_NAME
机器人:screenOrientation =风景
机器人:主题=@安卓风格/ Theme.NoTitleBar.Fullscreen
机器人:configChanges =方向| keyboardHidden
机器人:windowSoftInputMode =stateHidden>
&所述;意图滤光器>
<作用机器人:名字=android.intent.action.MAIN/>
<类机器人:名字=android.intent.category.LAUNCHER/>
<类机器人:名字=android.intent.category.DEFAULT/>
&所述; /意图滤光器>
< /活性GT; <活动机器人:名字=com.google.ads.AdActivity android:configChanges=\"keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize\"/>
<活动机器人:名字=com.greystripe.sdk.GSFullscreenActivity机器人:configChanges =键盘| keyboardHidden |方向|屏幕尺寸/>
<活动机器人:名字=com.mdotm.android.view.MdotMActivity机器人:launchMode =singleTop/>
<活动机器人:名字=com.chartboost.sdk.CBIm pressionActivity机器人:excludeFromRecents =真正的机器人:主题=@安卓风格/ Theme.Translucent.NoTitleBar机器人:configChanges =键盘| keyboardHidden |方向|屏幕尺寸/>
<活动机器人:名字=com.mopub.mobileads.MoPubActivity机器人:configChanges =keyboardHidden |方向/>
<活动机器人:名字=com.mopub.mobileads.MraidActivity机器人:configChanges =keyboardHidden |方向/>
<活动机器人:名字=com.mopub.mobileads.MraidBrowser机器人:configChanges =keyboardHidden |方向/>
<活动机器人:名字=com.mopub.mobileads.MraidVideoPlayerActivity机器人:configChanges =keyboardHidden |方向/> < /用途>< /清单>
你没有更新的版本。你需要从SDK管理器更新。如果你与Android的工作室工作,你可以做到这一点做到自动通过这样gradle这个文件中定义:
{相关性
编译com.android.support:support-v13:21.0.3
编译com.google.android.gms:游戏服务:87年6月5日
}
如果你使用Eclipse工作,你需要删除最早的谷歌播放服务,并从Android SDK中带来新的/额外
I get this error when trying to run the app:
Caused by: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 7095000 but found 6587000. 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" />
But that line of code is in my manifest sorry still noob at android
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.topgame.blackjackgfree1"
android:versionCode="2"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="10"/>
<uses-feature android:glEsVersion="0x00020000" />
<uses-permission android:name="com.android.vending.BILLING" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<supports-screens android:xlargeScreens="true"
android:largeScreens="true"
android:smallScreens="true"
android:anyDensity="true"
android:normalScreens="true"/>
<application android:label="@string/app_name"
android:icon="@drawable/icon"
android:hardwareAccelerated="true"
android:allowBackup="true"
>
<meta-data android:name="com.google.android.gms.games.APP_ID"
android:value="@string/app_id" />
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
<activity android:name="com.topgame.test.MainActivity"
android:label="@string/app_name"
android:screenOrientation="landscape"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:configChanges="orientation|keyboardHidden"
android:windowSoftInputMode="stateHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
<activity android:name="com.greystripe.sdk.GSFullscreenActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenSize" />
<activity android:name="com.mdotm.android.view.MdotMActivity" android:launchMode="singleTop"/>
<activity android:name="com.chartboost.sdk.CBImpressionActivity" android:excludeFromRecents="true" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:configChanges="keyboard|keyboardHidden|orientation|screenSize" />
<activity android:name="com.mopub.mobileads.MoPubActivity" android:configChanges="keyboardHidden|orientation"/>
<activity android:name="com.mopub.mobileads.MraidActivity" android:configChanges="keyboardHidden|orientation"/>
<activity android:name="com.mopub.mobileads.MraidBrowser" android:configChanges="keyboardHidden|orientation"/>
<activity android:name="com.mopub.mobileads.MraidVideoPlayerActivity" android:configChanges="keyboardHidden|orientation"/>
</application>
</manifest>
you don't have the updated version. you need to update from SDK manager. if you work with android studio you can do it do it automatic by define in gradle file like this:
dependencies {
compile 'com.android.support:support-v13:21.0.3'
compile 'com.google.android.gms:play-services:6.5.87'
}
if you work with eclipse, you need to remove the oldest google play services and bring the new from android sdk/extras
这篇关于在AndroidManifest.xml中的元数据标签没有正确的价值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!