0

Did anyone successfully build location service into Android Things? I am trying to use LocationServices, but it cannot connect with Google Play.

It complains "W/GooglePlayServicesUtil: Google Play Store is missing." and ConnectionResult is {statusCode=SERVICE_INVALID, resolution=null, message=null}

I have setup wifi on Android Things (Intel Edison) and it can fetch a webpage successfully.

The following is my gradle file.

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'
}

My first ever question on stackoverflow. Many thinks for your help!

0andriy
  • 4,183
  • 1
  • 24
  • 37
Larry
  • 1
  • 1
  • 1

2 Answers2

2
compile 'com.google.android.gms:play-services:10.2.6'

Android Things Developer Preview 4 does not support 10.2.6. It supports 10.0.0, as is noted in the release notes. My guess is that your Java code (which is not shown in your question) is going through a code path that is trying to upgrade Play Services to match your 10.2.6, and that is where you are getting your error.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • 1
    @Larry, also see [here, under the **Support for Google services** section](https://developer.android.com/things/sdk/index.html) – Onik May 28 '17 at 19:01
1

Android Things does not include the Google Play Store, which is responsible for automatically updating Play Services on the device. Because the Play Services version on the device is static, apps cannot target a client SDK greater than the version bundled with the target release. Source :- https://developer.android.com/things/sdk/index.html

SalFar
  • 9
  • 3