2

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?

gsiradze
  • 4,583
  • 15
  • 64
  • 111

2 Answers2

1

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'
}
IntelliJ Amiya
  • 74,896
  • 15
  • 165
  • 198
0

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.

Community
  • 1
  • 1
aga
  • 27,954
  • 13
  • 86
  • 121
  • 1
    I have latest Google Play Services and my emulator is on nexus 5. I'm using API 23 on android studio. so.. – gsiradze Dec 17 '15 at 08:11