Required XML attribute quot;adSizequot; was missing(必需的 XML 属性“adSize失踪)
问题描述
我在启动应用程序时收到缺少必需的 XML 属性adSize"".这写在我的智能手机屏幕上,而不是我的横幅上.
I get a "Required XML attribute "adSize" was missing" when I launch my app. This is written on the screen of my smartphone instead of my banner.
我尝试了基于堆栈的不同解决方案(例如 xmlns:ads="http://schemas.android.com/apk/res-auto"
而不是 xmlns:ads="http://schemas.android.com/apk/libs/com.google.ads"
或代替 xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
) 但它不起作用.
I tried the different solutions founded on stack (like xmlns:ads="http://schemas.android.com/apk/res-auto"
instead of xmlns:ads="http://schemas.android.com/apk/libs/com.google.ads"
or instead of xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
) but it doesn't work.
这是我的 java 代码(一个简单的 Hello World,只是为了尝试实现一个横幅):
Here's my java code (a simple Hello World just to try to implement a banner):
这是我的 xml 文件:
Here's my xml file:
这是我的清单:
我使用 google play 服务库.
I use the google play service lib.
推荐答案
这是一个奇怪的答案.我刚刚重新启动了我的 Eclipse,它开始工作了.这可能会对某些人有所帮助.
Here is a weird answer. I just restarted my eclipse and it stared working. This might help some one.
只需重启 eclipse、android studio 或 IntelliJ IDE
Just restart eclipse, android studio or IntelliJ IDE
这篇关于必需的 XML 属性“adSize"失踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!