mapbox-search-android icon indicating copy to clipboard operation
mapbox-search-android copied to clipboard

AddressAutofill suggestions is not working

Open shahalR opened this issue 2 years ago • 2 comments

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 ?

shahalR avatar Jan 04 '24 09:01 shahalR

Any updates regarding this?

DasserBasyouni avatar Mar 19 '24 05:03 DasserBasyouni

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.

Trishun avatar Aug 07 '24 17:08 Trishun