【问题标题】:Missing AdActivity with android:configChanges in AndroidManifest.xml error在 AndroidManifest.xml 错误中缺少带有 android:configChanges 的 AdActivity
【发布时间】:2015-01-07 05:40:49
【问题描述】:

我正在构建一个应用程序,我想在运行游戏时将广告横幅添加到游戏中,而不是添加广告我得到一个横幅,上面写着“AndroidManifest.xml 中的 android:configChanges 缺少 AdActivity”我尝试在线搜索对于这个问题,但似乎人们说什么来解决我已经纠正的问题。请帮忙

我在清单中添加的内容

<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.unity3d.player"
android:installLocation="preferExternal"
android:theme="@android:style/Theme.NoTitleBar"
android:versionCode="1"
android:versionName="1.0">
<supports-screens
    android:smallScreens="true"
    android:normalScreens="true"
    android:largeScreens="true"
    android:xlargeScreens="true"
    android:anyDensity="true"/>

<application
    android:icon="@drawable/app_icon"
    android:label="@string/app_name"
    android:debuggable="true">
    <activity android:name="com.unity3d.player.UnityPlayerNativeActivity"
              android:launchMode="singleTask"
              android:label="@string/app_name"
                  android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screen      Layout|screenSize|smallestScreenSize|uiMode|touchscreen">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
        <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />
    </activity>
    <activity android:name="com.google.android.gms.ads.AdActivity"
       android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScr eenSize"
      android:theme="@android:style/Theme.Translucent" />

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

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

【问题讨论】:

  • 如果问题出在其他地方,您能否在此处发布您的整个清单?
  • @VenkatatAxiomStudios 整个清单现已发布

标签: android unity3d admob


【解决方案1】:

您的清单格式不正确。

uses-permission 元素需要位于 manifest 元素内和 supports-screen 元素之前。

【讨论】:

  • 发布您的 Activity 布局、您的 Activity 代码和您的 logcat。
猜你喜欢
  • 1970-01-01
  • 2012-10-01
  • 2012-09-08
  • 2013-04-27
  • 1970-01-01
  • 2012-10-28
  • 2012-12-20
  • 2012-11-05
  • 2020-12-07
相关资源
最近更新 更多