7
votes

Recently Google began to mark Google Play apps that contain ads with a special sign. I'm asked to set a flag in the developers console, if my app has ads or not. However, when I set it to NO - a hint is displayed, that an active APK has AdMob SDK linked, so the app is suspected to be advertisement capable. No AdMob SDK is present in the gradle dependencies, just Google Analytics and Maps.

I guess, Google Analytics SDK depends on AdMob somehow. Is there a way to exclude hidden AdMob dependencies from my app?

Update:

gradle settings looks like this:

compile 'com.google.android.gms:play-services-analytics:8.1.0'
compile 'com.google.android.gms:play-services-maps:8.1.0'
2

2 Answers

11
votes

This dependecy is placed in com.google.android.gms:play-services-analytics
So you shuld exclude play-services-ads mudule from analytics' dependency in your build.gradle file this way:

compile ('com.google.android.gms:play-services-analytics:8.1.0') {
    exclude group: 'com.google.android.gms', module: 'play-services-ads'
}
3
votes

Google Play Services includes an API for Google Mobile Ads. You may have included the entire Google Play Services API instead of only including the Maps and Analytics APIs, which are the ones you need.

Check to see that you have this in your gradle:

compile 'com.google.android.gms:play-services-maps:8.3.0'
compile 'com.google.android.gms:play-services-analytics:8.3.0'

Instead of this:

compile 'com.google.android.gms:play-services:8.3.0'