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

PlaceAutocomplete error: Cannot access class 'com.mapbox.search.internal.bindgen.ApiType'

Open kw2583 opened this issue 1 year ago • 0 comments

Environment

  • Search SDK Component (check at least one)
    • [X] Core Search SDK (SearchEngine class, and etc.)
    • [ ] Offline Search SDK (OfflineSearchEngine class, and etc.)
    • [ ] Address Autofill SDK
    • [ ] Search UI SDK
  • Android OS version:
  • Devices affected:
  • Search SDK Version: 2.5.0

Code examples

val placeAutocomplete = PlaceAutocomplete.create()
[versions]
android = "11.8.0"
mapsCompose = "11.8.0"
placeAutocomplete = "2.5.0"

[libraries]
android = { module = "com.mapbox.maps:android", version.ref = "android" }
maps-compose = { module = "com.mapbox.extension:maps-compose", version.ref = "mapsCompose" }
place-autocomplete = { module = "com.mapbox.search:place-autocomplete", version.ref = "placeAutocomplete" }

Observed behavior and steps

Cannot initialize placeAutocomplete. The documentation indicates that the line above should include an API token as a parameter. However, the create() method in 2.5.0 does not take an API token. It should be initialized with default options, which include LocationProvder and ApiType. However, it generates the error indicated in the title: Cannot access class 'com.mapbox.search.internal.bindgen.ApiType'

On the Discord server, there are reports of this same issue going back at least to 2.2.0

Expected behavior

Initialize PlaceAutocomplete and execute queries.

kw2583 avatar Nov 19 '24 02:11 kw2583