Failed to resolve: com.google.android.libraries.places:1.0.0:
Asked Answered
F

3

8

I want to use Google places API but I can't sync the project with "com.google.android.libraries.places:1.0.0:" dependency. How to add the places in my project?.

Fredericafrederich answered 26/2, 2019 at 5:28 Comment(4)
Post your build.gradleCavalry
Please post your build.gradle. and don't use 'android-studio' tag unless your problem related to Android Studio.Transverse
you should find a good tutorial on internetOutandout
can you suggest a tutorial for me. I try many tutorails, but i didnt clear my doubts. still i dont know how to add nearby places in the google Map.Fredericafrederich
M
29

The library in documentation is wrong I guess, use this, it works. I had same issue few days back , gave a feedback to them on documentation they still didn't fix it.

implementation 'com.google.android.libraries.places:places:2.1.0'

You can see how to add places autocomplete over here

Edit: Seems like they finally fixed the documentation

Material answered 26/2, 2019 at 6:26 Comment(11)
I'm trying with the same but i'm still getting could not resolve error :( do i need to change anything else?Comenius
Try adding maven { url "https://maven.google.com" } in project level build.gradle below jcentre()Material
added it already but it is still giving the same error, it says sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested targetComenius
can you add your build.gradle file , both project and app oneMaterial
please help me to list places in to recycleview ?Fredericafrederich
Its easier to use their default intent launcher/ fragment instead of populating on recyclerview , Try implementing first using documentation If you are having any problem then I will helpMaterial
com.google.android.libraries.places.widget.AutocompleteActivity}: java.lang.IllegalStateException: Places must be initialized.Fredericafrederich
Actually i need for list near atm or hotels with user specified coverage. can you help me with that ?Fredericafrederich
add this line Places.initialize(getApplicationContext(), "GOOGLE_API_KEY")Material
Worked like a charm! Thank you.Quiet
That helped, thanks! Current version of places library is 2.5Sharpeyed
F
1

try to change

compileOnly "com.facebook.react:react-native:+"

by

api "com.facebook.react:react-native:+"
Frameup answered 23/4, 2019 at 9:37 Comment(0)
B
0

I also stuck with the same issue, now i removed this issue. According to google, "The v1.0.0 release of the Places SDK for Android introduces an all-new static library with updated functionality. The Google Play Services version of the Places SDK for Android (in Google Play Services 16.0.0) is deprecated as of January 29, 2019, and will be turned off on July 29, 2019."

Add following dependency it will work...

implementation 'com.google.android.libraries.places:places:1.0.0'

For more information you can visit, https://developers.google.com/places/android-sdk/client-migration

Book answered 24/3, 2019 at 4:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.