Skip to content

onMapLoadingError for Android **on v11** ? #3711

Closed Answered by enlivn
enlivn asked this question in Q&A
Discussion options

You must be logged in to vote

Here's a simple workaround for this issue:

Update your app/build.gradle file to switch from the v10 to the v11 API at build time.

edit: updated to fix some indentation in the text to replace


tasks.register('fixMapLoadingErrorForMapboxV11') {
    doLast {
        // With Mapbox native v11, there is a new API to detect map loading errors. The old v10 API is NOP'ed.
        // The main RN library has not been updated to use this new API and instead uses the old v10 API. This
        // gradle task switches to the new API at build time.
        def libFile = new File(rootProject.projectDir, '../node_modules/@rnmapbox/maps/android/src/main/java/com/rnmapbox/rnmbx/components/mapview/RNMBXMapVi…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by enlivn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant