首页 > 解决方案 > 谷歌播放服务 API

问题描述

我正在使用 android studio 3.3 版。我想将依赖项放在

'com.google.android.gms:play-services-location:16.0.2'

但是,我不断收到一个错误,提示无法解决。我已经搜索了谷歌 API,但因为我不断得到它而未能得到它

'com.google.android.gms:play-services-location:11.0.2' 

版本。你能帮我找到解决办法吗

标签: androidgoogle-play-services

解决方案


请将谷歌插件添加到文件底部

apply plugin: 'com.android.application'
android {
   compileSdkVersion 27
   buildToolsVersion "27.0.0"
    defaultConfig {
         applicationId "package name"
         minSdkVersion 17
         targetSdkVersion 27
         versionCode 1
         versionName "1.0"
     }
}

dependencies {
 compile 'com.google.android.gms:play-services-location:16.0.2'
}
// Add to the bottom of the file
apply plugin: 'com.google.gms.google-services'

推荐阅读