question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Maplibre failing on build

See original GitHub issue

Describe the bug

Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not resolve com.mapbox.mapboxsdk:mapbox-android-accounts:0.7.0.
     Required by:
         project :app > org.maplibre.gl:android-sdk:9.4.0
      > Could not resolve com.mapbox.mapboxsdk:mapbox-android-accounts:0.7.0.
         > Could not get resource 'https://dl.bintray.com/maplibre/maplibre-gl-native/com/mapbox/mapboxsdk/mapbox-android-accounts/0.7.0/mapbox-android-accounts-0.7.0.pom'.
            > Could not HEAD 'https://dl.bintray.com/maplibre/maplibre-gl-native/com/mapbox/mapboxsdk/mapbox-android-accounts/0.7.0/mapbox-android-accounts-0.7.0.pom'. Received status code 403 from server: Forbidden
   > Could not resolve com.mapbox.mapboxsdk:mapbox-sdk-turf:5.3.0.
     Required by:
         project :app > org.maplibre.gl:android-sdk:9.4.0
         project :app > project :react-native-mapbox-gl_maps
      > Could not resolve com.mapbox.mapboxsdk:mapbox-sdk-turf:5.3.0.
         > Could not get resource 'https://dl.bintray.com/maplibre/maplibre-gl-native/com/mapbox/mapboxsdk/mapbox-sdk-turf/5.3.0/mapbox-sdk-turf-5.3.0.pom'.
            > Could not HEAD 'https://dl.bintray.com/maplibre/maplibre-gl-native/com/mapbox/mapboxsdk/mapbox-sdk-turf/5.3.0/mapbox-sdk-turf-5.3.0.pom'. Received status code 403 from server: Forbidden

To Reproduce

With Mapbox SDK it works fine, but Maplibre is giving me issues.

  • On android/app/build.gradle I have the following:
dependencies {
    // ...
    // Added for Maplibre
    implementation 'org.maplibre.gl:android-sdk:9.4.0'
    // ...
}
  • On android/build.gradle I have the following:
buildscript {
    ext {
        // ...
        rnmbglMapboxLibs = {
            implementation ("org.maplibre.gl:android-sdk:9.2.1")
            implementation ("com.mapbox.mapboxsdk:mapbox-sdk-turf:5.3.0")
        }
        rnmbglMapboxPlugins = {
            implementation ("com.mapbox.mapboxsdk:mapbox-android-gestures:0.7.0")
            implementation ("com.mapbox.mapboxsdk:mapbox-android-plugin-localization-v9:0.12.0")    {
                exclude group: 'com.mapbox.mapboxsdk', module: 'mapbox-android-sdk'
            }
            implementation ("com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v9:0.8.0")        {
                exclude group: 'com.mapbox.mapboxsdk', module: 'mapbox-android-sdk'
            }
            implementation ("com.mapbox.mapboxsdk:mapbox-android-plugin-markerview-v9:0.4.0") {
                exclude group: 'com.mapbox.mapboxsdk', module: 'mapbox-android-sdk'
            }
        }
    }
}

repositories {
    // ...
    maven {
        url = "https://dl.bintray.com/maplibre/maplibre-gl-native"
    }
}

Expected behavior
App to build normally with open-source Maplibre working just fine. Actual behavior
Build stops with the output given above.

Versions (please complete the following information):

  • Platform: Android
  • Platform OS: Android 11
  • Device: Oneplus 5T
  • Emulator/ Simulator: No
  • Dev OS: Debian Bullseye
  • react-native-mapbox-gl Version 8.3.0
  • Mapbox GL version ???
  • React Native Version 0.65.1

Additional context
None

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:13 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
tomihuttunencommented, Feb 4, 2022

Adding jcenter was the only way for me to get the build working also.

Any plans or ideas when jcenter will (soon?) be shutdown? Anything that can be done in the build scripts to exclude this mapbox sdk dependency when using maplibre option?

1reaction
jbreuer95commented, Oct 8, 2021

Thank you! Would love to use maplibre since my app is only showing locally downloaded map tiles.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Maplibre failing on build · Issue #1532 · rnmapbox/maps
With Mapbox SDK it works fine, but Maplibre is giving me issues. On android/app/build.gradle I have the following: dependencies { // .
Read more >
Gatsby/Maplibre/Webpack-Error - Stack Overflow
I like to show a maplibre map in my gatsby site. I can do it in React. gatsby develop does not show me...
Read more >
Create a heatmap layer | MapLibre GL JS Docs
Visualize earthquake frequency by location using a heatmap layer.
Read more >
maplibre-gl - npm
maplibre -gl. TypeScript icon, indicating that this package has built-in type declarations. 2.4.0 • Public • Published 4 months ago.
Read more >
Using the MapLibre GL Native SDK for iOS with Amazon ...
Building the application: Initialization. To initialize your application: Create a new Xcode project from the App template. Select SwiftUI for its interface.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found