2
votes

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?

2
okay . set minSdkVersion 15IntelliJ Amiya
@IntelliJAmiya result is same..gsiradze
whats your classpathIntelliJ Amiya
The message means, the Google play services installed in the emulator are too old. Try to use a newer image for the emulator.Henry
@IntelliJAmiya works on 7.8.0 thanks a lotgsiradze

2 Answers

1
votes

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

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.