Reputation: 4733
I'm trying to make google maps application in android. I've installed Google Play Services in SDK manager. When I'm running that app there's error text in emulator:
App won't run unless you update Google Play services
build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "ge.currencyexchange"
minSdkVersion 9
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.1'
compile 'com.android.support:design:23.1.1'
compile 'com.google.android.gms:play-services:8.3.0'
}
I've tried change compile 'com.google.android.gms:play-services:8.3.0'
to compile 'com.google.android.gms:play-services:5.0.+'
but after debug it throws an error about theme and in AVD everything is same
What can I do?
Upvotes: 2
Views: 2367
Reputation: 75778
use compile 'com.google.android.gms:play-services:7.8.0'
instead of compile 'com.google.android.gms:play-services:8.3.0'
.
Finally
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.google.android.gms:play-services:7.8.0'
}
Upvotes: 1
Reputation: 29416
The error states that you need to update Google Play Services on your device, i.e. emulator. This error is thrown when the Play Services installed on device do not match the Play Services required by your application (or not installed at all).
Open Play Market, find Google Play Services and hit Update
. If you use Genymotion, I suggest you to read this answer.
Upvotes: 0