【发布时间】:2017-12-03 12:39:11
【问题描述】:
我正在尝试获取设备当前位置,但是当我尝试导入位置服务时。但它显示无法解析符号LocationService
import com.google.android.gms.location.LocationListener;
import com.google.android.gms.location.LocationRequest;
import com.google.android.gms.location.LocationServices;
Build.gradle 文件
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.0.0-beta1'
implementation 'com.android.support:design:26.0.0-beta1'
implementation 'com.google.android.gms:play-services-maps:11.6.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:0.5'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
我也尝试过使用 google play services 以前的版本(11.4.2)
【问题讨论】:
标签: android google-maps google-play-services android-studio-3.0