什么是Android的布局XML正确的xmlns网址为AdMob广告 [英] What is correct xmlns url for AdMob in Android Layout XML
问题描述
我测试的AdMob为Android SDK。我不能设置的AdMob:测试=真正的
因为AdMob的属性是未知
I am testing the AdMob for Android SDK. I can't set the admob:testing="true"
because the admob attribute is unknown.
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:admob="http://schemas.android.com/apk/res/org.ifies.android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="#FF000000"
android:clickable="true"
>
<com.admob.android.ads.AdView
android:id="@+id/admob"
android:visibility="visible"
android:layout_width="fill_parent"
android:layout_height="100px"
android:background="#FF0000"
admob:testing="true"
/>
</LinearLayout>
我的Eclipse正在抱怨的AdMob:测试=真正的
将有一个未知的preFIX。任何人有关于如何解决这一问题的想法?
My Eclipse is complaining that admob:testing="true"
would have an unknown prefix. Anyone got an idea on how to fix this?
子的问题:任何人有一个想法如何改变广告的高度?这似乎是固定在48像素,这是不是很好看任何Droid手机...
Sub question: Anyone got an idea how to change the height of the ad? It seems to be fixed to 48px, which is not looking good on any DROID phone...
推荐答案
可能是值得一试的错误是不是由于该文件以外的东西:
Might be worth checking that the error isn't due to something outside the file:
请确保您的模式URI您使用的是包名,org.ifies.android,匹配在AndroidManifest.xml中manifest元素在包装属性的值。
Make sure the package name you are using in your schema URI, "org.ifies.android", matches the value of the package attribute on the manifest element in AndroidManifest.xml.
确认RES /价值/ attrs.xml已指定的属性:
Make sure res/values/attrs.xml has the attributes specified:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="com.admob.android.ads.AdView">
<attr name="testing" format="boolean" />
<attr name="backgroundColor" format="color" />
<attr name="textColor" format="color" />
<attr name="keywords" format="string" />
<attr name="refreshInterval" format="integer" />
<attr name="isGoneWithoutAd" format="boolean" />
</declare-styleable>
</resources>
这篇关于什么是Android的布局XML正确的xmlns网址为AdMob广告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!