Google Awareness API v9.6 is missing

2019-02-18 15:35发布

问题:

I'm interested in new maps styling feature, which is added in 9.6 Google Play Services release, but also I'm using Awareness API. In my build.gradle I have

compile 'com.google.android.gms:play-services-maps:9.6.1'
compile 'com.google.android.gms:play-services-contextmanager:9.6.1'
compile 'com.google.android.gms:play-services-location:9.6.1'

and some other play-services/firebase modules. Previously with v9.4 that worked, but now I'm getting Failed to resolve: com.google.android.gms:play-services-contextmanager:9.6.1 BTW, all other libs with 9.6 version resolved correctly. Also I tried to use 9.6.0 and 9.+, nothing worked.

Please, don't suggest adding compile 'com.google.android.gms:play-services:9.6.1' because it's increasing compile time dramatically.

UPD: just discovered, that Activity Recognition is included in location package, so I don't need awareness. But it's not an answer

回答1:

Starting 9.6.0 it was renamed to "awareness", so you should use

compile 'com.google.android.gms:play-services-awareness:9.6.1'

You can check it in "Google Repository rev 35", simply navigate to:

ANDROID_HOME/extras/google/m2repository/com/google/android/gms

and there you will see that there is no 9.6.0 and 9.6.1 folders inside "play-services-contextmanager" but there is new folder "play-services-awareness" with 9.6.0 and 9.6.1

Not sure is it permanent or temporary, because as you said in documentation it's still named "play-services-contextmanager"