mapbox / mapbox/mapbox-search-android

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

Open
#296 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Kotlin
Stars
39
Forks
10
PR merge metrics
No merged PRs in 30d

Description

## 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
```kotlin
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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Kotlin example with the listed 2.5.0 dependencies and inspect PlaceAutocomplete.create() and its default options. Confirm whether the public API exposes the required types without the ApiType access error; done means PlaceAutocomplete initializes and queries execute as expected.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.