Android 横幅广告 SDK
我在将横幅广告添加到我的Android应用程序中遇到了问题。我使用版本27 SDK完成了该应用程序。我遵循有关添加横幅广告的说明,当我添加“实现'com.google.android.gms:play-services-ads:20.6.0'” build.gradle中,Android Studio标记了SDK不足和不足的错误需要升级到31或更高。
我使用“项目结构对话框”将SDK升级到版本31,然后IDE突出显示了需要升级的依赖项,我使用“建议”选项卡来升级,试图运行代码并且不会运行。 如下所示。
终端 预先感谢您的时间。
多亏了@mikahli,我能够克服依赖性问题,但是我现在在初始化时遇到了错误。我在文档中复制了代码,请参阅初始化错误。事先感谢所有参与其中的人。
I am having problems adding Banner Ads to my Android App. I had done the app using Version 27 SDK. I followed the instruction on adding Banner ads, when I added the "implementation 'com.google.android.gms:play-services-ads:20.6.0'" in build.gradle, Android Studio flagged an error that SDK is inadequate and needs to be upgraded to 31 or higher.
I used the Project Structure Dialog to upgrade the SDK to version 31, the IDE then highlighted the dependencies that needed upgrading which I used the "Suggestion" tab to upgrade, tried to run the code and it won't run.The error on build terminal is shown below Build terminal error
Please can anyone help me solve this problem? Thanks in advance for your time.
Thanks to @Mikahli, I was able to go past the dependency issue but I am now getting errors on initialisation. I copied the code in the documentation, please see Initialisation Errors. Thanks in advance to everyone involved.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
请检查以下 link 。
也许这是您现在面临的问题:
如果是这种情况
please check the following link.
Maybe this is the problem you are facing now:
If that's the case you can fix it by adding
android:exported="true"
to activities, services, or broadcast receivers in your Manifest您显示的错误图像与错误清单合并相关。我以前见过这个错误,所以我建议你一定要看看这个答案。
检查这个答案
:清单合并失败..也许会有帮助..
The error image you have shown is related to the error manifest merger. I have seen this error before, so i recommend that you must see this answer.
Check this answer
: Manifest merger failed..maybe it will help..