Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mapbox Search w/ Mapbox v9 #93

Closed
1 of 4 tasks
cchierici opened this issue Oct 24, 2022 · 7 comments
Closed
1 of 4 tasks

Mapbox Search w/ Mapbox v9 #93

cchierici opened this issue Oct 24, 2022 · 7 comments
Labels
bug Something isn't working

Comments

@cchierici
Copy link

cchierici commented Oct 24, 2022

Environment

  • Search SDK Component (check at least one)
    • Core Search SDK (SearchEngine class, and etc.)
    • Offline Search SDK (OfflineSearchEngine class, and etc.)
    • Address Autofill SDK
    • Search UI SDK
  • Android OS version: Android 13 / API 33
  • Devices affected: tested with a Pixel 6
  • Search SDK Version: 1.0.0-beta.39
  • Included in project Maps SDK, Nav SDK versions if available:
    Mapbox SDK 9.5.0
    Navigation SDK 2.7.0

Code examples

Observed behavior and steps

Observed a crash on App Start with the search core library only imported in buidl.gradle but without using any of it's functions or API.

java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZN6mapbox6common13EventsServiceC1EONS0_20EventsServiceOptionsE" referenced by "/data/app/~~SJ1CEMouzZWsBNbKOrhYSg==/de.xxx.yyy.dev-xG9CxLRFRi1L74mF_Fbw8w==/base.apk!/lib/arm64-v8a/libmapbox-maps.so"...

I tried before with 1.0.0-beta.38 which resulted in build issues due to a duplicated class MapboxCommonLogger.

So I assume that the search library only works with Mapbox v10. If there is a way to make it work with v9 please let me know, since i need the search feature very soon and a migration to v10 would take much more effort.

At least it would be nice to add a note on the search documentation page that v10 is required in case.

Thanks in advance

@cchierici cchierici added the bug Something isn't working label Oct 24, 2022
@kalbaxa
Copy link
Contributor

kalbaxa commented Oct 24, 2022

Hi Claus, thanks for reaching out!

We highly encourage you to update from the Legacy Maps SDK to the high-performant v10, and I totally understand it's a migration effort, but the Migration guide should help.

Other than that we are keeping consistency for our SDK to work with the most recent version of Search, Maps and Navigation SDKs, so our customers get access to latest features, best results, and performance.

We will add the compatibility compatibility note. This is a sound suggestion, thank you!

cc @cchierici @DzmitryFomchyn

@cchierici
Copy link
Author

Thank you for your quick answer. This reads to me that search will not work properly with Mapbox v9.
Or do you plan to address the issue i mentioned above?

Kind regards

@kalbaxa
Copy link
Contributor

kalbaxa commented Oct 25, 2022

Or do you plan to address the issue i mentioned above?

We will re-consider this in 3 weeks, taking into account the amount effort that would be required to support both. I will let you know @cchierici.

@dingdev88
Copy link

implementation 'com.mapbox.maps:android:10.9.0'
implementation "com.mapbox.navigation:android:2.7.0"
implementation ("com.mapbox.search:mapbox-search-android:1.0.0-beta.39")

I am using these dependencies, but I am getting same error.

java.lang.RuntimeException: Unable to get provider androidx.startup.InitializationProvider: androidx.startup.StartupException: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZN6mapbox6common13EventsServiceC1EONS0_20EventsServiceOptionsE" referenced by "/data/app/~~SJ1CEMouzZWsBNbKOrhYSg==/de.xxx.yyy.dev-xG9CxLRFRi1L74mF_Fbw8w==/base.apk!/lib/arm64-v8a/libmapbox-maps.so"...

I tried with 1.0.0-beta.38 which resulted in build issues due to a duplicated class MapboxCommonLogger.
Please update this. thanks.

@DzmitryFomchyn
Copy link
Contributor

@dingdev88 you're using quite an old version of the Navigation SDK https://github.com/mapbox/mapbox-navigation-android/releases/tag/v2.7.0

When picking Mapbox SDK dependencies, they all should have the same/compatible versions of the Common SDK. Common SDK versions used in Mapbox SDKs you can find in the release notes on github: Search, Maps, Navigation.

In your case you declared:

Try picking Navigation SDK 2.9.0-rc.1 or newer.

Let me know if it works for you.

@dingdev88
Copy link

@DzmitryFomchyn
Thanks. It seems works.

@DzmitryFomchyn
Copy link
Contributor

Ok, I'm closing this issue then. Feel free to reopen or create a new one if you have more questions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants