mapbox / mapbox-search-android

Android SDK for Mapbox Search including preconfigured UI
https://docs.mapbox.com/android/search/guides/
Other
33 stars 8 forks source link

AddressAutofill suggestions is not working #177

Open shahalR opened 10 months ago

shahalR commented 10 months ago

Integrated following Mapbox dependencies

implementation 'com.mapbox.maps:android:10.15.1'
implementation "com.mapbox.search:place-autocomplete:1.0.0-rc.7"
implementation "com.mapbox.search:autofill:1.0.0-rc.7"

And initialized AddressAutofill with addressAutofill = AddressAutofill.create(getString(R.string.mapbox_access_token))

But while using suggestions() to get address list, getting

Cannot access class 'com.mapbox.search.common.IsoLanguageCode'. Check your module classpath for missing or conflicting dependencies`

val addresses = addressAutofill.suggestions(searchQuery!!, AddressAutofillOptions())

Is there any work around this ? or do I need to use the API feature ?

DasserBasyouni commented 8 months ago

Any updates regarding this?

Trishun commented 3 months ago

Hi @DasserBasyouni @shahalR I've had problem with suggestions method suggestions in place autocomplete. I spent two days, but crucial was adding project dependencies:

    implementation "com.mapbox.search:base:$searchApiVersion"
    implementation "com.mapbox.search:mapbox-search-android-native:$searchNativeVersion"

In my case

    searchApiVersion = '2.3.1'
    searchNativeVersion = '2.2.1'

Every release has native lib version described, it must match.