添加“com.google.android.gms:play-services-location:17.0.0”库时出错

问题描述 投票:0回答:2

添加“com.google.android.gms:play-services-location:17.0.0”时出现错误 各种方法都试过了,问题还是没有解决。

implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
android build.gradle android-library
2个回答
1
投票

我想我遇到了你的问题,我可以看到你使用的是反引号(`)而不是撇号(')。

解决方案:编辑此行:

实现 'com.google.android.gms:play-services-location:17.0.0`

像这样:

implementation 'com.google.android.gms:play-services-location:17.0.0'

0
投票

确保您已将

apply plugin: 'com.android.application'
添加到您的 head
build.gradle
文件中并参考这篇文章:添加 google play 服务

© www.soinside.com 2019 - 2024. All rights reserved.