我在我的應用中有一個webview,就是這樣。我測試了它,它的工作,但是當我將代碼添加到admob時,它開始強制關閉。我做了一些評論,看看是什麼導致它關閉,當我從main.xml中刪除Abmob相關的代碼時,它開始正常工作。App force關閉添加admob webview
main.xml中
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<WebView
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="800dp" />
<com.admob.android.ads.AdView
android:id="@+id/ad"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
ads:adUnitId="a14d--mypub--id--"
ads:adSize="BANNER"
ads:loadAdOnCreate="true"/> />
</RelativeLayout>
誰能告訴我什麼,我做錯了什麼?
請從logcat的 – bart
http://stackoverflow.com/questions/4653763/android-admob-adview-force-close – Android
http://code.google.com/mobile/afma_ads/docs/添加堆棧跟蹤android/doubleclick/ – Android