马幸吉
马幸吉

Reputation: 11

The admob ads doesn't display, but no error in my logcat

I'd like to test my admob ads in my Android application, but the ads can't display. And no error can be found in the logcat. I also can find the success request for ads from Admob. I use "X" to indicate my publish 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>

Upvotes: 1

Views: 3982

Answers (1)

Vlado Pandžić
Vlado Pandžić

Reputation: 5048

If AdMob says you app status is "Active" it means everything is fine with your code and your app is sending request to admob. The problem is that there is for some reason no ads for you.
As you said it is active I would try this:

Click "Manage Settings" of your app (at AdMob > Sites & Apps) then choose App Settings tab and select

"Use keyword-targeted ads and Google certified ad networks (GCANs) to improve fill rate."

This way you will have more chances for some ad to display.

You will receive this message at Sites & Apps page:

Google AdSense Ads Enabled Congratulations! Apps in your account have been enabled to serve Google AdSense ads. For any unfilled ad request, AdMob will attempt to serve Google AdSense ads to help improve your fill rate. No further changes are required on your part.

This helped for me. I was not receiving ads, now it works perfectly. Maybe this will help someone.

Upvotes: 2

Related Questions