com.google.ads.adview无法实例化Admob的原因

时间:2014-02-13 14:33:14

标签: java android admob

我在应用程序上安装Admob后出现错误。 在某种程度上它很奇怪...我可以运行我的应用程序,我的广告也显示但在 图形布局视图。他告诉我这个:

   The following classes could not be instantiated:
    - com.google.ads.AdView (Open Class, Show Error Log)
    See the Error Log (Window > Show View) for more details.

当我查看错误日志时,它说:

com.google.ads.adview failed to instantiate

我的代码

<RelativeLayout 
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads ="http://schemas.android.com/apk/lib/com.google.ads"
xmlns:tools="http://schemas.android.com/tools" 

android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:background="@drawable/lined2"
tools:context=".MainActivity" >

<com.google.ads.AdView
       android:id="@+id/adview"
       android:layout_width="fill_parent"
       android:layout_height="wrap_content"
       android:layout_alignLeft="@+id/button4"
       android:layout_alignParentBottom="true"
       ads:adSize="BANNER"
       ads:adUnitId="MY ID"
       ads:loadAdOnCreate="true"
       ads:testdevices="TEST_EMULATOR" >
   </com.google.ads.AdView>

有人有想法吗? 我可以忽略这个吗?

0 个答案:

没有答案