I have download a demo project from http://developer.android.com/training/location/retrieve-current.html, and I think I don\'t lost any steps; But I can\'t find which jar fi
Jeremie Petitjean's solution worked for me. Go into youbuild.grade
file and configure your app for a lower version. This is what I used and it works now:
apply plugin: 'com.android.application'
android {
compileSdkVersion 19
buildToolsVersion "19.1.0"
defaultConfig {
applicationId "<APPLICATION NAME>"
minSdkVersion 9
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:19.1.0'
compile 'com.android.support:appcompat-v7:19.0.1'
compile 'com.google.android.gms:play-services:4.2+'
}
Update the Google Play library to the latest version using the Android SDK Manager. In addition, I had to remove the library manually and add it again to my project following these steps. Version 3.1.36 contains:
The location folder:
You might have to update the ADT/SDK as well.
Add to Gradle file (x.y.z - actual version of Google Play Services):
compile 'com.google.android.gms:play-services-location:x.y.z'
add this to your project `
implementation 'com.google.android.gms:play-services-location:16.0.0'//location services`
Try this if you use Android Studio:
Right click on your app folder -> Open Module Settings -> Dependencies -> Click on the plus button -> Choose library dependency -> Search for "play-services" -> Double click on the com.google.android.gms:play-services
Press Ok and wait for Gradle to rebuild. If error occurs clean and rebuild your project. here