mapbox / mapbox/mapbox-navigation-android

Request: Provide precompiled version with ndk >= 23

Open
#7,565 9 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Kotlin
Stars
651
Forks
321
PR merge metrics
No merged PRs in 30d

Description

Hello! I'm opening this issue after [this previous discussion](https://github.com/expo/expo/issues/24853) in the Expo repository.

Long story short, I'm trying to create an Expo module in order to use Mapbox Navigation in an Expo-managed React Native app (by wrapping Android and iOS native sdks). In iOS I got it working, but in Android I'm experiencing a crash on runtime, when attempting to render the most minimal example of your drop-in UI (a very basic NavigationView).

I tried reproducing the error in a clean Android project and it obviously doesn't happen ([here's a repo with the minimal code working](https://github.com/santitopo/mapbox-nav-android-minimal-example/tree/main)), so that led me to think the issue was related to some incompatibility between Expo/React Native and the Android Mapbox Nav sdk.

[@kudo](https://github.com/Kudo) checked out the issue and suggested that the incompatibility could have to do with the fact that this library is prebuilt with ndk r21, which is incompatible with ndk r23 in React Native 0.72 / expo sdk 49.

>relevant code https://github.com/mapbox/mapbox-navigation-android/blob/3d7f04aedec72f063d28731cd9facd70114b5cf3/gradle/dependencies.gradle#L181 that AGP 7.2.2 is still using ndk r21 by default.

My request then (and I'm probably speaking for the whole React Native/Expo community here 😅) is if it could be possible to provide a precompiled version with a higher ndk, or provide some other solution.

Thanks a lot in advance and hope that we can come to a solution together! I've seen plenty of devs out there wanting to use this sdk through the years 🙌 (https://github.com/mapbox/mapbox-navigation-android/issues/1312, https://github.com/homeeondemand/react-native-mapbox-navigation/issues/112, https://github.com/mapbox/mapbox-navigation-android/issues/1652, https://github.com/mapbox/mapbox-navigation-android/issues/2441, https://github.com/homeeondemand/react-native-mapbox-navigation, and more 😄 )

**Android API:** Any
**Mapbox Navigation SDK version:** 2.16

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 reviewing gradle/dependencies.gradle around line 181 and the reported NDK r21 versus NDK r23 compatibility in React Native 0.72 and Expo SDK 49. Reproduce the crash with the linked minimal example and compare it with the clean Android project. Done means an agreed precompiled artifact or documented compatible solution that works for the Expo-managed example.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin, react-native
Domain
build-system, mobile-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.