Android studio 包名称更改后不显示Admob广告

Android studio 包名称更改后不显示Admob广告,android-studio,admob,Android Studio,Admob,我正在为我的应用程序开发一个新版本,其中包含一个测试包名称,这样我就不会打扰当前的用户 Admob的本地广告正在显示,但一旦我将应用程序包名称更改为我在Play Store中使用的当前p.N,广告将不再显示,我收到以下错误消息: 上一个本机ad加载失败。正在尝试加载另一个 注:我的应用程序不受广告限制 PS 2:admob链接到我的firebase帐户 dependencies { implementation fileTree(include: ['*.jar'], dir: 'lib

我正在为我的应用程序开发一个新版本,其中包含一个测试包名称,这样我就不会打扰当前的用户

Admob的本地广告正在显示,但一旦我将应用程序包名称更改为我在Play Store中使用的当前p.N,广告将不再显示,我收到以下错误消息:

上一个本机ad加载失败。正在尝试加载另一个

注:我的应用程序不受广告限制 PS 2:admob链接到我的firebase帐户

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.palette:palette:1.0.0'
    implementation 'com.google.android.material:material:1.0.0' // Crash when updating
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'

    testImplementation 'junit:junit:4.12'
    //implementation 'de.hdodenhof:circleimageview:3.0.1'
    implementation 'com.mikhaellopez:circularimageview:3.2.0'          // circle image view

    androidTestImplementation 'androidx.test:runner:1.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

    implementation "com.leinardi.android:speed-dial:2.0.1"
    implementation 'androidx.cardview:cardview:1.0.0'

    implementation 'com.android.volley:volley:1.1.1'

    implementation 'com.android.support:multidex:1.0.3'
    implementation 'com.squareup.picasso:picasso:2.71828'
    implementation 'org.jsoup:jsoup:1.8.1'

    implementation 'com.facebook.shimmer:shimmer:0.1.0@aar'


    // Firebase login
    implementation 'com.firebaseui:firebase-ui-auth:6.2.0'
    implementation 'com.facebook.android:facebook-android-sdk:5.15.1'


    implementation 'com.google.firebase:firebase-analytics:17.2.3'          // Firebase Analytics
    implementation 'com.google.firebase:firebase-crashlytics:17.0.0-beta02'
    // Add the Firebase SDK for Crashlytics.
    //implementation 'com.google.firebase:firebase-perf:19.0.5'                 // Add the dependency for the Performance Monitoring library


    implementation 'com.google.firebase:firebase-messaging:20.1.3'          // Other Firebase
    implementation 'com.github.guy-4444:SmartRateUsDialog-Android:1.00.08' // Rate us

    implementation 'com.google.android.gms:play-services-ads:19.0.1'        // ads
    implementation project(':nativetemplates')                              // nativetemplates

}
buildscript {
    repositories {
        mavenLocal()
        mavenCentral()
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.6.1'
        classpath 'com.google.gms:google-services:4.3.3'
        // Add the Crashlytics Gradle plugin.
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.0.0-beta03'


        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenLocal()
        google()
        jcenter()
        maven { url 'https://jitpack.io' }

    }
}
我的依赖项:

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.palette:palette:1.0.0'
    implementation 'com.google.android.material:material:1.0.0' // Crash when updating
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'

    testImplementation 'junit:junit:4.12'
    //implementation 'de.hdodenhof:circleimageview:3.0.1'
    implementation 'com.mikhaellopez:circularimageview:3.2.0'          // circle image view

    androidTestImplementation 'androidx.test:runner:1.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

    implementation "com.leinardi.android:speed-dial:2.0.1"
    implementation 'androidx.cardview:cardview:1.0.0'

    implementation 'com.android.volley:volley:1.1.1'

    implementation 'com.android.support:multidex:1.0.3'
    implementation 'com.squareup.picasso:picasso:2.71828'
    implementation 'org.jsoup:jsoup:1.8.1'

    implementation 'com.facebook.shimmer:shimmer:0.1.0@aar'


    // Firebase login
    implementation 'com.firebaseui:firebase-ui-auth:6.2.0'
    implementation 'com.facebook.android:facebook-android-sdk:5.15.1'


    implementation 'com.google.firebase:firebase-analytics:17.2.3'          // Firebase Analytics
    implementation 'com.google.firebase:firebase-crashlytics:17.0.0-beta02'
    // Add the Firebase SDK for Crashlytics.
    //implementation 'com.google.firebase:firebase-perf:19.0.5'                 // Add the dependency for the Performance Monitoring library


    implementation 'com.google.firebase:firebase-messaging:20.1.3'          // Other Firebase
    implementation 'com.github.guy-4444:SmartRateUsDialog-Android:1.00.08' // Rate us

    implementation 'com.google.android.gms:play-services-ads:19.0.1'        // ads
    implementation project(':nativetemplates')                              // nativetemplates

}
buildscript {
    repositories {
        mavenLocal()
        mavenCentral()
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.6.1'
        classpath 'com.google.gms:google-services:4.3.3'
        // Add the Crashlytics Gradle plugin.
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.0.0-beta03'


        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenLocal()
        google()
        jcenter()
        maven { url 'https://jitpack.io' }

    }
}
我的毕业典礼

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.palette:palette:1.0.0'
    implementation 'com.google.android.material:material:1.0.0' // Crash when updating
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'

    testImplementation 'junit:junit:4.12'
    //implementation 'de.hdodenhof:circleimageview:3.0.1'
    implementation 'com.mikhaellopez:circularimageview:3.2.0'          // circle image view

    androidTestImplementation 'androidx.test:runner:1.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

    implementation "com.leinardi.android:speed-dial:2.0.1"
    implementation 'androidx.cardview:cardview:1.0.0'

    implementation 'com.android.volley:volley:1.1.1'

    implementation 'com.android.support:multidex:1.0.3'
    implementation 'com.squareup.picasso:picasso:2.71828'
    implementation 'org.jsoup:jsoup:1.8.1'

    implementation 'com.facebook.shimmer:shimmer:0.1.0@aar'


    // Firebase login
    implementation 'com.firebaseui:firebase-ui-auth:6.2.0'
    implementation 'com.facebook.android:facebook-android-sdk:5.15.1'


    implementation 'com.google.firebase:firebase-analytics:17.2.3'          // Firebase Analytics
    implementation 'com.google.firebase:firebase-crashlytics:17.0.0-beta02'
    // Add the Firebase SDK for Crashlytics.
    //implementation 'com.google.firebase:firebase-perf:19.0.5'                 // Add the dependency for the Performance Monitoring library


    implementation 'com.google.firebase:firebase-messaging:20.1.3'          // Other Firebase
    implementation 'com.github.guy-4444:SmartRateUsDialog-Android:1.00.08' // Rate us

    implementation 'com.google.android.gms:play-services-ads:19.0.1'        // ads
    implementation project(':nativetemplates')                              // nativetemplates

}
buildscript {
    repositories {
        mavenLocal()
        mavenCentral()
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.6.1'
        classpath 'com.google.gms:google-services:4.3.3'
        // Add the Crashlytics Gradle plugin.
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.0.0-beta03'


        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenLocal()
        google()
        jcenter()
        maven { url 'https://jitpack.io' }

    }
}

您需要将该应用注册为新应用,并将ID更改为。请解释更多信息。顺便说一句,我使用的软件包名称与PlayStore上的现有应用关联。您只需在AdMob上创建新的新应用。然后用旧的替换新的广告id。创建新应用时,不要选择从play store中选择应用的选项。但是测试广告也没有加载,我认为这并不能解释这一点。你需要将应用注册为新的应用,并将id更改为。你能解释更多吗,顺便说一句,我使用的软件包名称与PlayStore上的现有应用程序关联。您只需在AdMob上创建新的新应用程序。然后用旧的替换新的广告id。创建新的应用程序时,不要选择从play store中选择应用程序的选项。但测试广告也不会加载,我想这并不能解释这一点