Failed to resolve: com.google.android.gms:play-ser

2019-07-25 11:24发布

问题:

Having updated to AS v2.2.2 I can no longer resolve the Google Play Services maps and location facets. The message I receive is;

Error:(54, 27) Failed to resolve: com.google.android.gms:play-services-maps:9.6.1 Install Repository and sync project
/Documents/workspace//Polaris/build.gradle">Show in File
Show in Project Structure dialog

The install link does not work and I have uninstalled AS and reinstalled as well as having uninstalled Play Services and reinstalled the latest (v37 at the time of writing).

All out of ideas. I do not have the classpath 'com.google.gms:google-services:3.0.0' and apply plugin: 'com.google.gms.google-services' bits and pieces that related questions suggest. I don't know what they are for so avoiding... plus, it worked on Android Studio v2.2 (at the same version 9.6.1).

Any help in getting my Google flavour to build again much appreciated.

回答1:

Fixed by manually downloading Play Services as described here and moving into position under the SDK.

:S

#hacking4life