【问题标题】:Google Play Store is missing in Android ThingsAndroid Things 中缺少 Google Play 商店
【发布时间】:2017-05-28 18:52:11
【问题描述】:

有人成功地将位置服务构建到 Android Things 中吗?我正在尝试使用 LocationServices,但它无法连接到 Google Play。

它抱怨“W/GooglePlayServicesUtil:缺少 Google Play 商店”。 ConnectionResult 是 {statusCode=SERVICE_INVALID, resolution=null, message=null}

我在 Android Things (Intel Edison) 上设置了 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 的问题。许多人认为您的帮助!

【问题讨论】:

    标签: android google-play-services android-things intel-edison


    【解决方案1】:
    compile 'com.google.android.gms:play-services:10.2.6'
    

    Android Things 开发者预览版 4 不支持 10.2.6。它支持 10.0.0,如 the release notes 中所述。我的猜测是您的 Java 代码(未在您的问题中显示)正在通过代码路径尝试升级 Play 服务以匹配您的 10.2.6,这就是您收到错误的地方。

    【解决方案2】:

    Android Things 不包括负责自动更新设备上的 Play 服务的 Google Play 商店。由于设备上的 Play Services 版本是静态的,因此应用程序不能以高于与目标版本捆绑的版本为目标的客户端 SDK。来源:-https://developer.android.com/things/sdk/index.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-03-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-06-04
      相关资源
      最近更新 更多