1

Android アプリで AdMob 広告をテストしたいのですが、広告が表示されません。また、logcat にエラーは見つかりません。Admob からの広告の成功リクエストも見つかります。「X」を使用してパブリッシュ ID を示します。

package com.admob.test;

import android.app.Activity;
import android.os.Bundle;

public class AdmobTestActivity extends Activity {
/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
}

.

    <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.admob.test"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="4" />

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >
        <activity
            android:name=".AdmobTestActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name="com.google.ads.AdActivity"
                        android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|s        mallestScreenSize" />
    </application>
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

</manifest>

.

    <?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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">
  <com.google.ads.AdView android:id="@+id/adView"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         ads:adUnitId="xxxxxxxxxxxxxxx"
                         ads:adSize="BANNER"
                         ads:testDevices="C904358AFB272CDFA888A5C1CB914DA4"
                         ads:loadAdOnCreate="true"/>
</LinearLayout>
4

1 に答える 1

2

AdMob でアプリのステータスが「アクティブ」であると表示された場合は、コードに問題がなく、アプリがリクエストを admob に送信していることを意味します。問題は、何らかの理由で広告がないことです。
あなたがアクティブだと言ったように、私はこれを試してみます:

アプリの [設定の管理] をクリックし ([AdMob] > [サイトとアプリ])、[アプリの設定] タブを選択して、

「キーワード ターゲット広告と Google 認定広告ネットワーク (GCAN) を使用して、広告掲載率を向上させます。」

これにより、広告が表示される機会が増えます。

サイトとアプリのページに次のメッセージが表示されます。

Google AdSense 広告が有効になりました アカウントのアプリは、Google AdSense 広告を配信できるようになっています。満たされていない広告リクエストがある場合、AdMob は Google AdSense 広告の配信を試みて、広告掲載率を向上させます。これ以上の変更は必要ありません。

これは私にとって役に立ちました。広告を受信して​​いませんでしたが、今では完全に機能しています。多分これは誰かを助けるでしょう。

于 2012-09-03T21:10:45.790 に答える