问题描述
Google 在其 Google Play 开发者控制台的定价和分发页面上添加了一个新选项,要求发布商声明他们是否有广告.我们的应用没有广告,但我们被标记为有 AdMob SDK.
Google has put a new option on their Pricing and Distribution page of their Google Play Developer Console that requires publishers to declare if they have ads or not. Our app does not have ads, yet we are being flagged as having the AdMob SDK.
我们在您的一个或多个活动 APK 中检测到广告 SDK:
We detected Ad SDKs in one or more of your active APKs:
version: XXXXX, sdk: AdMob
如果您的应用正在投放广告,请将您的广告声明更改为'是的'.未能准确声明存在广告是一项政策违规行为,并可能导致您的应用从 Google Play 下架.你可以访问我们的帮助中心了解更多信息.
If your app is serving ads, please change your ads declaration to 'Yes'. Failure to accurately declare the presence of ads is a policy violation and may result in your app's removal from Google Play. You can visit our Help Center to learn more.
据我从 Gradle 文件中得知,我们没有 AdMob:
We don't have AdMob, as far as I can tell from our Gradle file:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'me.dm7.barcodescanner:zxing:1.7.2'
compile 'com.google.android.gms:play-services:8.3.0'
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:cardview-v7:23.1.0'
compile 'com.android.support:recyclerview-v7:23.1.0'
}
什么可能导致这种依赖出现?我怎样才能摆脱它?
What might be causing that dependency to show up? How can I get rid of it?
推荐答案
您可以运行 gradlew -q dependencies app:dependencies
来查看每个配置的依赖项(包括所有传递依赖项).
You can run gradlew -q dependencies app:dependencies
to see a the dependencies (including all transitive dependencies) for each of your configurations.
也可以指定单个配置,比如用--configuration releaseCompile
You can also specify a single configuration, such as with --configuration releaseCompile
在您的情况下,您会发现 Google Play 服务包含对 AdMob 的传递依赖.
In your case, you will find that Google Play Services includes a transitive dependency on AdMob.
您可以通过仅使用 Play 服务的单个组件(例如 play-services-location
) 而不是整个 Play 服务.但是,您可能会发现您使用的单个组件之一仍然依赖于 AdMob.例如,play-services-analytics
版本 8.1.0 对 play-services-ads
具有传递依赖,即 AdMob SDK.
You can mitigate this by using only individual components of Play Services (such as play-services-location
) instead of the entirety of Play Services. However, you may find that one of the individual components you use still relies on AdMob. For example, version 8.1.0 of play-services-analytics
has a transitive dependency on play-services-ads
, which is the AdMob SDK.
这篇关于Google Play:我们在您的应用程序中发现了广告 SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!