gpt4 book ai didi

android - 您必须在 Manifest.xml 中包含 AdActivity

转载 作者:太空狗 更新时间:2023-10-29 12:50:08 26 4
gpt4 key购买 nike

我收到一条错误消息,要求您必须在 list 文件中声明 AdActivity。我什至做到了,我遵循了所有步骤,但仍然出现错误。请有人帮忙,这是我的代码、xml 和 list 文件。

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="fill" >

<com.google.ads.AdView
android:id="@+id/googleAd"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/button3"
ads:adSize="BANNER"
ads:adUnitId="i_don't_want_to_share_my_id"
ads:loadAdOnCreate="true" >
</com.google.ads.AdView>

list 文件。

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.admob"
android:installLocation="auto"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="16" />

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

<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >

<activity
android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />

<activity
android:name=".Main"
android:label="@string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

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

我还包含了最新的 admob jar 文件。有人能帮忙吗

最佳答案

<activity
android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />


change the above code to


<activity
android:name="com.example.admob.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />

关于android - 您必须在 Manifest.xml 中包含 AdActivity,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13066304/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com