简体   繁体   中英

Google Play Services Analytics library implementation causing Play Console ads warning

I've been having a warning in the Ads App Content of Google Play saying that "We found ad SDKs in your app". After publishing many versions trying to resolve that, I discovered that the cause is these lines in my app-level build Gradle file:

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

Is there something I could be missing to exclude?

I ran 'gradlew -q dependencies app:dependencies command' and these are the transitive dependencies of the library:

+--- com.google.android.gms:play-services-analytics-impl:18.0.1
|    +--- com.google.android.gms:play-services-base:18.0.1
|    |    +--- androidx.collection:collection:1.0.0
|    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    +--- androidx.core:core:1.2.0
|    |    |    +--- androidx.annotation:annotation:1.1.0
|    |    |    +--- androidx.lifecycle:lifecycle-runtime:2.0.0
|    |    |    |    +--- androidx.lifecycle:lifecycle-common:2.0.0
|    |    |    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    +--- androidx.arch.core:core-common:2.0.0
|    |    |    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    \--- androidx.versionedparcelable:versionedparcelable:1.1.0
|    |    |         +--- androidx.annotation:annotation:1.1.0
|    |    |         \--- androidx.collection:collection:1.0.0 (*)
|    |    +--- androidx.fragment:fragment:1.0.0
|    |    |    +--- androidx.core:core:1.0.0 -> 1.2.0 (*)
|    |    |    +--- androidx.legacy:legacy-support-core-ui:1.0.0
|    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    +--- androidx.core:core:1.0.0 -> 1.2.0 (*)
|    |    |    |    +--- androidx.legacy:legacy-support-core-utils:1.0.0
|    |    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    |    +--- androidx.core:core:1.0.0 -> 1.2.0 (*)
|    |    |    |    |    +--- androidx.documentfile:documentfile:1.0.0
|    |    |    |    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    |    +--- androidx.loader:loader:1.0.0
|    |    |    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    |    |    +--- androidx.core:core:1.0.0 -> 1.2.0 (*)
|    |    |    |    |    |    +--- androidx.lifecycle:lifecycle-livedata:2.0.0
|    |    |    |    |    |    |    +--- androidx.arch.core:core-runtime:2.0.0
|    |    |    |    |    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    |    |    |    |    \--- androidx.arch.core:core-common:2.0.0 (*)
|    |    |    |    |    |    |    +--- androidx.lifecycle:lifecycle-livedata-core:2.0.0
|    |    |    |    |    |    |    |    +--- androidx.lifecycle:lifecycle-common:2.0.0 (*)
|    |    |    |    |    |    |    |    +--- androidx.arch.core:core-common:2.0.0 (*)
|    |    |    |    |    |    |    |    \--- androidx.arch.core:core-runtime:2.0.0 (*)
|    |    |    |    |    |    |    \--- androidx.arch.core:core-common:2.0.0 (*)
|    |    |    |    |    |    \--- androidx.lifecycle:lifecycle-viewmodel:2.0.0
|    |    |    |    |    |         \--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    |    +--- androidx.localbroadcastmanager:localbroadcastmanager:1.0.0
|    |    |    |    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    |    \--- androidx.print:print:1.0.0
|    |    |    |    |         \--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    +--- androidx.customview:customview:1.0.0
|    |    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    |    \--- androidx.core:core:1.0.0 -> 1.2.0 (*)
|    |    |    |    +--- androidx.viewpager:viewpager:1.0.0
|    |    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    |    +--- androidx.core:core:1.0.0 -> 1.2.0 (*)
|    |    |    |    |    \--- androidx.customview:customview:1.0.0 (*)
|    |    |    |    +--- androidx.coordinatorlayout:coordinatorlayout:1.0.0
|    |    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    |    +--- androidx.core:core:1.0.0 -> 1.2.0 (*)
|    |    |    |    |    \--- androidx.customview:customview:1.0.0 (*)
|    |    |    |    +--- androidx.drawerlayout:drawerlayout:1.0.0
|    |    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    |    +--- androidx.core:core:1.0.0 -> 1.2.0 (*)
|    |    |    |    |    \--- androidx.customview:customview:1.0.0 (*)
|    |    |    |    +--- androidx.slidingpanelayout:slidingpanelayout:1.0.0
|    |    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    |    +--- androidx.core:core:1.0.0 -> 1.2.0 (*)
|    |    |    |    |    \--- androidx.customview:customview:1.0.0 (*)
|    |    |    |    +--- androidx.interpolator:interpolator:1.0.0
|    |    |    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    +--- androidx.swiperefreshlayout:swiperefreshlayout:1.0.0
|    |    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    |    +--- androidx.core:core:1.0.0 -> 1.2.0 (*)
|    |    |    |    |    \--- androidx.interpolator:interpolator:1.0.0 (*)
|    |    |    |    +--- androidx.asynclayoutinflater:asynclayoutinflater:1.0.0
|    |    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    |    |    \--- androidx.core:core:1.0.0 -> 1.2.0 (*)
|    |    |    |    \--- androidx.cursoradapter:cursoradapter:1.0.0
|    |    |    |         \--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    +--- androidx.legacy:legacy-support-core-utils:1.0.0 (*)
|    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    |    +--- androidx.loader:loader:1.0.0 (*)
|    |    |    \--- androidx.lifecycle:lifecycle-viewmodel:2.0.0 (*)
|    |    +--- com.google.android.gms:play-services-basement:18.0.0
|    |    |    +--- androidx.collection:collection:1.0.0 (*)
|    |    |    +--- androidx.core:core:1.2.0 (*)
|    |    |    \--- androidx.fragment:fragment:1.0.0 (*)
|    |    \--- com.google.android.gms:play-services-tasks:18.0.1
|    |         \--- com.google.android.gms:play-services-basement:18.0.0 (*)
|    +--- com.google.android.gms:play-services-basement:18.0.0 (*)
|    \--- com.google.android.gms:play-services-stats:17.0.3
|         +--- androidx.legacy:legacy-support-core-utils:1.0.0 (*)
|         \--- com.google.android.gms:play-services-basement:18.0.0 (*)

If your app isn't using ads don't worry, in this case it is a false positive and Google know that & tell you to leave it as is (see the image below)

I found out that most of analytics SDKs are using (IDFA) to recognize unique users efficiently.

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM