0

我按照 admob 教程向我的应用程序添加了一个 admob 横幅(这个http://www.wikihow.com/Add-Advertisements-to-Your-Android-Applications-Using-Admob

我使用以下代码添加它

<com.google.ads.AdView 
    android:id="@+id/adView" 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    ads:adSize="BANNER" 
    ads:adUnitId="a151ebd8dece188" 
    ads:loadAdOnCreate="true" > 
</com.google.ads.AdView>

我的清单中也有

<activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />

</application>

并且

但是,每当我在应用程序上打开此视图时,它都会崩溃。我在这里查看了许多 admob 问题,但找不到我的代码中明显遗漏的任何内容。我想念的东西很简单吗?

4

1 回答 1

0

Try some of the following things:

  • Uptade eclipse and android SDK

  • Download adMob SDK from here and add jar in your libs folder. Also don't forget to add jar to your build path

  • Also, don't forget to set permissions (internet, access network state)

  • If nothing works, follow these instructions and it should work!

Let me know if it works

于 2013-07-21T13:57:31.763 回答