gpt4 book ai didi

android - AdMob 广告根本没有显示

转载 作者:太空狗 更新时间:2023-10-29 15:17:52 26 4
gpt4 key购买 nike

所以我下载了最新的admob sdk。按照所有说明将其导入项目等。

然后我还通过将 project.properties 目标更改为 android-13 并将 min-sdk 设置为 10,在 2.3.3 中允许广告。

还在 list 中声明了这一点:

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

像这样在 XML 中声明 AdView :

<com.google.ads.AdView android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adUnitId="xxxxxx" <!--replaced xxxxxx with publisher id-->
ads:adSize="BANNER"
ads:testDevices="xxxxx" <!--replaced xxxxx with device id-->
ads:loadAdOnCreate="true"/>

在所有这一切之后,广告根本就没有出现!!在图形布局中,它说无法实例化类

我哪里做错了?

最佳答案

您的项目libs 目录中是否包含admob.jar 文件?

关于android - AdMob 广告根本没有显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10928871/

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