I know this question is really simple for the persons experimented with android but please help me. I followed this tutorial : https://examples.javacodegeeks.com/android/android-location-api-using-google-play-services-example/ to the latitude and longitude of my device.
My problem is this part :
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.1.1'
compile "com.google.android.gms:play-services:8.3.0"
}
I tried to do the same with my own code :
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.android.gms:play-service:8.3.0'
testCompile 'junit:junit:4.12'
}
but when I synchronize the project I get this error :
fail to resolve:com.google.android.gms:play-service:8.3.0
So in my SDK manager I downloaded the google play service but here's my problem : How can I check the version of my 'com.google.android.gms:play-service' ???
EDIT :
The version I searched for was 10.2.1 If you have the same problem check File->Project Structure->Dependencies->'+' and check version. It works on AVD now but with it you have a new error :
My gradle.build (app)
EDIT 2 : if you have the same error check https://developers.google.com/android/guides/setup and select what you want (exemple compile 'com.google.android.gms:play-services-location:10.2.1')