skip to Main Content

When i was installing @rnmapbox/maps, i followed all procedures but i got this error
FAILURE: Build failed with an exception.

  • What went wrong:
    Could not determine the dependencies of task ‘:app:processDebugResources’.

Could not resolve all dependencies for configuration ‘:app:debugRuntimeClasspath’.
Could not resolve com.mapbox.maps:android:11.0.0.
Required by:
project :app > project :rnmapbox_maps
> Could not resolve com.mapbox.maps:android:11.0.0.
> Could not get resource ‘https://api.mapbox.com/downloads/v2/releases/maven/com/mapbox/maps/android/11.0.0/android-11.0.0.pom’.
> Could not GET ‘https://api.mapbox.com/downloads/v2/releases/maven/com/mapbox/maps/android/11.0.0/android-11.0.0.pom’. Received status code 401 from server: Unauthorized
Could not resolve com.mapbox.mapboxsdk:mapbox-sdk-turf:6.11.0.
Required by:
project :app > project :rnmapbox_maps
> Could not resolve com.mapbox.mapboxsdk:mapbox-sdk-turf:6.11.0.
> Could not get resource ‘https://api.mapbox.com/downloads/v2/releases/maven/com/mapbox/mapboxsdk/mapbox-sdk-turf/6.11.0/mapbox-sdk-turf-6.11.0.pom’.
> Could not GET ‘https://api.mapbox.com/downloads/v2/releases/maven/com/mapbox/mapboxsdk/mapbox-sdk-turf/6.11.0/mapbox-sdk-turf-6.11.0.pom’. Received status code 401 from server: Unauthorized

  • Try:

Run with –stacktrace option to get the stack trace.
Run with –info or –debug option to get more log output.
Run with –scan to get full insights.
Get more help at https://help.gradle.org.

I am tring to include mapbox in expo react native application

2

Answers


  1. Chosen as BEST ANSWER

    i was able to solve it when i build it using EAS build


  2. "Received status code 401 from server: Unauthorized".
    Put your token to app.json. Like this:

    {"expo": {
    "plugins": [[
        "expo-location",
        {
          "locationWhenInUsePermission": "Show current location on map."
        }
      ],
      [
        "@rnmapbox/maps",
        {
          "RNMapboxMapsVersion": "11.0.0",
          "RNMapboxMapsDownloadToken": "sk.ey.."
        }
      ]
    ]}}
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search