我正在嘗試通過admob添加一些廣告到我的應用程序,我已經在使用admob sdk 4.1.1。 我在這裏看到了一些帖子,但他們指的是舊版本。我的Android應用程序看不到廣告(admob)
我只用XML配置並沒有改變Java端什麼。我的代碼是:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:layout_width="wrap_content"
<LinearLayout android:layout_width="wrap_content" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads"
android:id="@+id/linearLayout1" android:layout_height="wrap_content"
android:layout_alignParentBottom="true">
<com.google.ads.AdView android:id="@+id/adView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
ads:adUnitId="--myUnitId--"
ads:adSize="BANNER"
ads:loadAdOnCreate="true"
/>
</LinearLayout>
問題是我在我的應用程序中看不到任何廣告。我在admob儀表板上看到了一些請求,但是沒有展示。任何人都可以幫我弄清楚問題是什麼?我是否缺少一些代碼?
由於提前,
若昂
謝謝您的回答,我想在我的物理設備,而不是模擬器,我怎麼能看到在設備中的logcat的? –
有一個名爲DDMS工具,還有亞洲開發銀行在SDK,如果一切都失敗有應用程序將通過電子郵件的logcat輸出發送到您 –
感謝,我下載了一個應用程序(aLogCat),這讓我發送日誌通過電子郵件,並分析我的請求 –