Reputation: 1459
I read previous posts but I still cannot solve the problem. I am using API 23 and the app includes a Google Map. The target of the emulator is Google APIs (API level 23). In my gradle file it shows:
dependencies {
compile 'com.google.android.gms:play-services:8.3.0'
}
In my emulator, I saw the Google Play Services version is "8.1.85" in the setting. I cannot change the play-services version in my gradle file to "8.1.85" and I still cannot figure out how to make the Google Play Service version to 8.3.0 in my emulator.
I'm new to Android so if I miss some information please tell me. The emulator works fine before I add code to make connection with a server and send some JSON abject to the server. I'm not sure if this might influence the Google Play Service.
Here is build.gradle: apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.sophie.myapp1"
minSdkVersion 23
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.google.android.gms:play-services:8.3.0'
compile 'com.android.support:design:23.1.0'
}
Upvotes: 2
Views: 702
Reputation: 97
Since google is letting this be a single problem affecting MANY developers. I'll carve it out - to fix this I can verify a solution:
in your gradle file:
compile 'com.google.android.gms:play-services:+' // this will pull the latest version.
Then in your emulator select an Android Virtual Device, AVD that runs API version 21. I just choose Nexus 5 API 21 x86 - can't remember id it's a default one.
Having said that it's probably important to note that I also have this setting in my gradle file:
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.example.der_geiler.XXX"
minSdkVersion 21
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
Upvotes: 0
Reputation: 3599
I also faced the same problem. I used the emulator of Google API version 21 and it is working fine.
Upvotes: 5