[英]My Android app shows Admob interstitial Test ads but not real ads
我的 Android 应用程序显示 Admob 插页式测试广告,但不显示真实广告。 在发布这个问题之前,我尝试了很多解决方案。 但我找不到任何工作的答案。 我也尝试使用新的广告 ID。 (等了 2 周还是一无所获……)并且测试广告效果很好。
我想问题出在 build.gradle 应用程序中
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.xxxxx.yyyyy"
minSdkVersion 18
targetSdkVersion 27
buildToolsVersion "27.0.0"
versionCode 1
versionName "2.0"
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:support-v4:27.0.0'
implementation 'com.android.support:appcompat-v7:27.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.google.android.gms:play-services-ads:11.8.0'
}
我试图迁移到 AndroidX 。 仍然无法正常工作,并且出现许多错误...
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.xxxxx.yyyyy"
minSdkVersion 18
targetSdkVersion 28
buildToolsVersion "28.0.3"
versionCode 1
versionName "2.0"
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.annotation:annotation:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
androidTestImplementation 'androidx.test:runner:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
implementation 'com.google.android.gms:play-services-ads:19.5.0'
}
将您的设备设置为测试设备。 检查此项以设置测试设备。 如果您使用的是模拟器,它已经被设置为测试设备。 使用测试 ID 来测试广告。 仅当您要发布应用程序时,才使用您的原始应用程序 ID 和广告 ID。 确保您的 Ad mod 帐户没有任何限制(例如正在评估的帐户,广告投放受到限制)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.