Google Play服务应用的AndroidManifest.xml错误中的元数据标记

时间:2015-05-23 20:17:52

标签: java android eclipse admob

我的应用程序存在问题。 Eclipse错误日志显示:

Caused by: java.lang.IllegalStateException: The meta-data tag in your app's  AndroidManifest.xml does not have the right value.  Expected 4242000 but found  7327000.  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" />
at com.google.android.gms.common.GooglePlayServicesUtil.n(Unknown Source)
at com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(Unknown Source)
at com.google.android.gms.internal.u.a(Unknown Source)
at com.google.android.gms.internal.ag.U(Unknown Source)
at com.google.android.gms.internal.ag.a(Unknown Source)
at com.google.android.gms.ads.AdView.loadAd(Unknown Source)
at com.example.myapp.activities.EditActivity.loadAds(EditActivity.java:201)
at com.example.myapp.activities.EditActivity.onCreate(EditActivity.java:96)
at android.app.Activity.performCreate(Activity.java:5426)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2269)

这是我的AndroidManifest.xml:

   <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

<application
    android:name="com.example.myapp.custom.BaseApplication"
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@android:style/Theme.NoTitleBar" >

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

    <activity
    ...

我无法弄清楚这里出了什么问题:(如果我停用AdMob横幅广告和插页式广告(从字符串中移除ID)应用程序运行良好。

感谢您的帮助

0 个答案:

没有答案