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?


Solution 1:

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.

Solution 2:

I have follow below steps and It removes the notification

First check that which gradle package contains "play-services-ads-identifier" package depency. You can add update those packages like below:

implementation('com.google.firebase:firebase-analytics') {
    exclude module: "play-services-ads-identifier"
    exclude module: "play-services-measurement"
    exclude module: "play-services-measurement-sdk"
}

Second, If you have analytics package in your gradle which contains ads then you have to follow these steps OR you can skip it. You can add below tag in your app's manifest's tag.

<meta-data android:name="google_analytics_adid_collection_enabled"
        android:value="false" />

Hope it will help you as well.

Solution 3:

From the Google Play Support Chat I was addressed to say "No" in Google Play Console, despite the detection.

Solution 4:

I have solved with these steps

  1. First find list of android dependencies which contain play-services-ads-identifier. Through Android Studio Gradle Panel Click on Gradle tab on the right side

Task will print all dependencies including internal packages example included in below image

  1. After that exclude play-services-ads-identifier. in my case I have two dependencies which contain play-services-ads.
  • First dependency:
implementation('com.google.firebase:firebase-core:19.0.2') {
    exclude module: "play-services-ads-identifier"
    exclude module: "play-services-measurement"
    exclude module: "play-services-measurement-sdk"
}
  • Second dependency:
implementation('com.google.firebase:firebase-analytics') {
    exclude module: "play-services-ads-identifier"
    exclude module: "play-services-measurement"
    exclude module: "play-services-measurement-sdk"
}

It solved my issues.