Android AdMob-检查应用程序是否已禁用

Android AdMob-检查应用程序是否已禁用,android,admob,google-admob,Android,Admob,Google Admob,我想知道是否有办法检查我的应用程序是否被禁用,无法从AdMob提供广告。我在Google Play Store中发布了一个旧应用程序,该应用程序上曾经有广告,现在我又开始使用该应用程序,我一直在尝试再次添加AdMob,但没有成功。我在尝试在真实设备上提供广告时遇到以下错误 注意:如果我将真实设备添加为测试设备,则测试广告将正确显示,并且测试广告也将在模拟器中正确显示 There was a problem getting an ad response. ErrorCode: 0 Failed t

我想知道是否有办法检查我的应用程序是否被禁用,无法从AdMob提供广告。我在Google Play Store中发布了一个旧应用程序,该应用程序上曾经有广告,现在我又开始使用该应用程序,我一直在尝试再次添加AdMob,但没有成功。我在尝试在真实设备上提供广告时遇到以下错误

注意:如果我将真实设备添加为测试设备,则测试广告将正确显示,并且测试广告也将在模拟器中正确显示

There was a problem getting an ad response. ErrorCode: 0
Failed to load ad: 0
我一直在通过互联网上的多个线程寻找解决方案,其中一些线程表明我的应用程序已被禁用,无法提供AdMob的广告,我本应收到一封包含相关信息的电子邮件,该应用程序已无人参与数月,因此我可能丢失了该电子邮件,我们是否有办法从AdMob控制台检查特定应用程序的状态

注意:我的帐户在AdMob控制台中的状态为“打开”

这是我的应用程序当前依赖项和代码,如果有帮助:

渐变依赖项:

...
compile 'com.firebaseui:firebase-ui:1.2.0'
compile 'com.jakewharton:butterknife:8.5.1'
compile 'com.github.jkwiecien:EasyImage:1.3.1'
compile 'com.android.support:cardview-v7:25.2.0'
compile 'com.google.firebase:firebase-ads:10.2.0'
compile 'com.google.firebase:firebase-crash:10.2.0'
...
LoginActivity.java

...
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    MobileAds.initialize(this, "ca-app-pub-X~Y");
...
MainFragment.java

...

    AdView mAdView = (AdView) view.findViewById(R.id.adView);
    AdRequest adRequest = new AdRequest.Builder().build();
    mAdView.loadAd(adRequest);
...
fragment_main.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/content_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"

android:paddingTop="@dimen/activity_vertical_margin"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="com.x.y.MainActivity"

android:background="@color/tw__composer_deep_gray">


<android.support.v7.widget.CardView
    android:id="@+id/titleCardView"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentTop="true"
    android:layout_marginLeft="@dimen/activity_horizontal_margin"
    android:layout_marginRight="@dimen/activity_horizontal_margin"
    android:layout_marginBottom="10dp">

    <TextView
        android:text="TextView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/usernameTitle"
        android:layout_margin="10dp" />
</android.support.v7.widget.CardView>

<android.support.v7.widget.CardView
    android:id="@+id/imageCardView"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_below="@+id/titleCardView"
    android:layout_above="@+id/adView"
    android:layout_marginLeft="@dimen/activity_horizontal_margin"
    android:layout_marginRight="@dimen/activity_horizontal_margin"
    android:layout_marginBottom="10dp">

    <ImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:srcCompat="@drawable/com_facebook_button_background"
        android:id="@+id/profileImage"
        android:layout_gravity="center_vertical|center_horizontal" />
</android.support.v7.widget.CardView>


<com.google.android.gms.ads.AdView
    android:id="@+id/adView"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_centerHorizontal="true"
    android:layout_alignParentBottom="true"
    ads:adSize="BANNER"
    ads:adUnitId="@string/banner_ad_unit_id">
</com.google.android.gms.ads.AdView>
</RelativeLayout>

如果您刚刚创建了AdMob ads单元,则必须等待数小时才能使用它

或者您刚刚添加了错误的广告id。

根据,错误代码0表示:

这表明内部发生了一些事情;例如,从ad服务器接收到无效响应

新创建的广告单元最多需要2小时才能激活(启动时间)。来自新创建的广告单元的任何广告请求也会收到错误代码0,以响应广告请求,直到它们准备好提供实时广告为止

怎么办?测试广告


你在admob控制台中的应用程序状态如何……通常你应该查看你的应用程序是否已挂起……即使你的帐户已打开,也可以在那里删除一个应用程序……你能提供你的代码吗?@Opiatefuchs我在哪里可以看到该“状态”,我无法在admob页面的任何地方看到与应用程序相关的状态,谢谢。@AlejandroMorán,你说得对。这很奇怪。尝试创建新帐户和/或新用户。@AlejandroMorán,噢。很奇怪。我建议您等待24小时注册新的appid。可能是你的帐户被禁止了。所以,我真的不知道为什么会出现这个错误。广告单元不是最近创建的,我已经尝试过几天前创建的广告单元
Error Code 0 : ERROR_CODE_INTERNAL_ERROR