有沒有人成功將位置服務構建到Android物品中?我正在嘗試使用LocationServices,但無法連接到Google Play。Android商店中缺少Google Play商店物品
抱怨「W/GooglePlayServicesUtil:Google Play商店缺失。」和ConnectionResult是{statusCode = SERVICE_INVALID,分辨率=空,消息=空}
我已經在Android的東西(英特爾愛迪生)上設置wifi,它可以成功地獲取網頁。
以下是我的gradle文件。
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
defaultConfig {
applicationId "com.example.androidthings.myproject"
minSdkVersion 24
targetSdkVersion 25
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
dependencies {
compile 'com.google.android.gms:play-services:10.2.6'
provided 'com.google.android.things:androidthings:0.4-devpreview'
}
我的第一個問題在stackoverflow。許多人認爲你的幫助!
@Larry,也可以參考[在這裏,**支持谷歌服務**部分](https://developer.android.com/things/sdk/index.html) – Onik