首页 > 解决方案 > 删除谷歌广告依赖并忘记从清单文件中删除元数据

问题描述

昨天,我在 Google Play 上发布了我的第一个应用程序。它仍在等待审查。起初我打算在应用程序中添加广告,为此我在 Android Studio 中使用了 Firebase 助手。所以它添加:

build.gradle [应用程序]

...
apply plugin: 'com.google.gms.google-services'
...

dependencies {
    ...
    implementation 'com.google.android.gms:play-services-ads:19.4.0'
}

build.gradle[项目]

classpath 'com.google.gms:google-services:4.3.4'

在清单文件中:

<manifest ...>
    <!-- Include required permissions for Google Mobile Ads to run. -->
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <application ...>

        <!--
        This is the sample AdMob App ID. Insert your own AdMob App ID in quotes
        https://googlemobileadssdk.page.link/admob-android-update-manifest
        -->
        <meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="ca-app-pub-3940256099942544~3347511713" />

            ....
    </application>

</manifest>

最后,我决定从应用程序中删除广告,因此我从 gradle 文件中删除了这一行,并从代码中删除了所有用法:

    implementation 'com.google.android.gms:play-services-ads:19.4.0'

我忘了删除其他行:

这条线

apply plugin: 'com.google.gms.google-services'

这一行:

classpath 'com.google.gms:google-services:4.3.4'

还有这个(渗透和元数据)

<!-- Include required permissions for Google Mobile Ads to run. -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<application ...>

    <!--
    This is the sample AdMob App ID. Insert your own AdMob App ID in quotes
    https://googlemobileadssdk.page.link/admob-android-update-manifest
    -->
    <meta-data
        android:name="com.google.android.gms.ads.APPLICATION_ID"
        android:value="ca-app-pub-3940256099942544~3347511713" />

        ....
</application>

在 google play 控制台中,当询问:您的应用是否包含广告?我选择否。

我的问题是因为这个错误,我的申请会被拒绝吗?有没有办法在谷歌审查之前修复这个错误?

标签: androidgoogle-playads

解决方案


不用担心,您的申请不会被拒绝。如果您愿意,您现在可以发布一个新的更新,Google Play 将检查这个新的更新而不是之前的这个问题。


推荐阅读