2011-04-07 27 views
1

我在我的应用程序使用AdMob通过在设备上运行它试图attrs.xml而事实证明,没有什么,我发现在attrs.xml文件中的logcatAdMob的误差在机器人

04-07 10:49:05.570: ERROR/Ads(1084): AdView missing required XML attribute adUnitId. 

的followig错误我有以下行

<?xml version="1.0" encoding="utf-8"?> 

<declare-styleable name="com.google.ads.AdView"> 
<attr name="backgroundColor" format="color" /> 
<attr name="primaryTextColor" format="color" /> 
<attr name="secondaryTextColor" format="color" /> 
<attr name="keywords" format="string" /> 
<attr name="refreshInterval" format="integer" /> 
</declare-styleable> 

我的错误是什么...

我在我的应用程序中共有4项活动,我正在尝试在第4项活动中添加admob。我是否需要添加上面说的(资源与“<'>”)与该活动或其他任何东西请帮助我的朋友......

回答

0

我也跟着说:作为here,它开始工作。 (我很久没有问过这个问题,我的确得到了成功与任何的答案,我离开它,当我试过现在它的工作...)

0

应行:

<?xml version="1.0" encoding="utf-8"?> 
<resources> 
<declare-styleable name="com.admob.android.ads.AdView"> 
     <attr name="backgroundColor" format="color" /> 
     <attr name="primaryTextColor" format="color" /> 
     <attr name="secondaryTextColor" format="color" /> 
     <attr name="keywords" format="string" /> 
     <attr name="refreshInterval" format="integer" /> 
</declare-styleable> 
</resources> 
+0

我已经使用那些,但我忘了添加这里的帽子......这不是问题 – 2011-04-07 09:29:47