Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
552 views
in Technique[技术] by (71.8m points)

android - Google Play: We found Ad SDKs in your application

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.

We detected Ad SDKs in one or more of your active APKs:

version: XXXXX, sdk: AdMob

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.

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You can run gradlew -q dependencies app:dependencies to see a the dependencies (including all transitive dependencies) for each of your configurations.

You can also specify a single configuration, such as with --configuration releaseCompile

In your case, you will find that Google Play Services includes a transitive dependency on AdMob.

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...