无法让AdMob在Android上工作:ErrorCode 0
  我对此感到非常绝望。  我遵循https://developers.google.com/admob/android/quick-start网页上的Google提供的说明,但它仍然无效我的代码(或至少是与AdMob有关的部分)实例化在menu.java类中: 
AdView adView = (AdView) findViewById(R.id.myaddview); //add the cast
AdRequest adRequest = new AdRequest.Builder()
            .addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
            .build();
adView.loadAd(adRequest);
XML中的横幅对于“banner_ad_unit_id”,我使用了从AdMob帐户获得的ID。 我甚至尝试为不同的应用程序制作多个不同的广告(不同的adID,并且仍然得到相同的结果)
 <com.google.android.gms.ads.AdView
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    ads:adSize="SMART_BANNER"
    android:id="@+id/myaddview"
    ads:adUnitId="@string/banner_ad_unit_id"
    android:layout_below="@+id/button4"/>
我的清单片段:
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme">
    <meta-data
        android:name="com.google.android.gms.version"
        android:value="@integer/google_play_services_version" />
    <activity
        android:name="com.google.android.gms.ads.AdActivity"
        android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
  Gradle的build.gradle : 
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:23.0.0'
    compile 'com.google.android.gms:play-services:8.1.0'
}
而minSDK是21(用于测试目的(但是> 9以上,所以它不应该是一个问题)
我还从SDK管理器更新了Google Play服务,我在logcat中获得了这一点:
09-28 00:53:59.798  15533-15693/com.example.slaven.toplel W/Ads﹕ There was a problem getting an ad response. ErrorCode: 0
09-28 00:53:59.816  15533-15533/com.example.slaven.toplel W/Ads﹕ Failed to load ad: 0
有趣的是,无论使用什么代码,我都会得到该错误:我甚至在https://github.com/googleads/googleads-mobile-android-examples上使用了Google的adMob示例,并且仍然在LogCat中使用相同的代码。 在我运行我的应用程序后,我去了我的AdMob帐户,发现有0个AdMob网络请求。 任何帮助将不胜感激!
据Google称:
 Something happened internally; for instance, an invalid response was received from the ad server. 
我不确定你在这里可以做些什么。 查看链接横幅广告和AdRequest类。
看来我在手机上安装的自定义ROM包含一个AdBlock插件。 所以我换成了Cyanogenmod,没有更多的问题。
链接地址: http://www.djcxy.com/p/32275.html