Eliminate hidden Google AdMob dependency on Android application

Google recently started tagging Google Play apps with special-label ads. I asked to set a flag in the developer console if there are ads in my application or not. However, when I set it to NO - a hint is displayed that the active APK is associated with the AdMob SDK, so the application is supposed to be advertised. There is no AdMob SDK in the gradle dependencies, only Google Analytics and Maps.

I suppose the Google Analytics SDK is somehow dependent on AdMob. Is there any way to exclude hidden AdMob dependencies from my application?

Update:

gradle settings look like this:

compile 'com.google.android.gms:play-services-analytics:8.1.0' compile 'com.google.android.gms:play-services-maps:8.1.0' 
+5
source share
2 answers

This dependency is in com.google.android.gms:play-services-analytics
So you shuld exclude play-services-ads mudule from analytics dependency in build.gradle file as follows:

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

Google Play Services includes the Google Mobile Ads API. You may have included the entire Google Play Services API, not just the Maps and Analytics APIs you need.

Make sure you have this in 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' 
+3
source

Source: https://habr.com/ru/post/1236345/


All Articles