Skip to content

Mapbox Offline - Unable to Download Mapbox Offline AARs (bindgen & gestures) for .NET MAUI Project #13586

@AbhisekAcharya

Description

@AbhisekAcharya

Hi Team,

I do have a application built in .Net MAUI 9.0 using C# and MVVM architecture. I have Mapbox.GL.js for online maps but i also need maps in offline mode too. Below are steps i followed for implementing offline maps using Mapbox.Maui package.
• I created an account in the Mapbox Console.
• After the account was created, a default public access token was available.
• I then created a secret token because my application requires offline map functionality. While generating the secret token, I selected the “Downloads: Read” scope.
• I added this secret token to the gradle.properties file located at ~/.gradle/gradle.properties.
• As I am a .NET MAUI developer, I created a .NET MAUI project targeting .NET 9.0.
• I installed the Mapbox.Maui NuGet package version 10.11.1.1.
• Then I added the following snippet in my .csproj file:

sk.XXXXX maven { url = uri("https://api.mapbox.com/downloads/v2/releases/maven") authentication { create("basic") } credentials { username = "mapbox" password = providers.gradleProperty("MAPBOX_DOWNLOADS_TOKEN").get() } }

• When building the project, I received multiple issues. Sometimes I get:

C:\Users\abhiseka.nuget\packages\dependencies.gradle\7.6.0.1\buildTransitive\Dependencies.Gradle.targets(29,3):
error GDL001: Gradlew build failed...
error XBD001: Download failed. Please download https://drive.google.com/... to C:\Users\abhiseka\AppData\Local\XamarinBuildDownloadCache\MapboxMapsObjC-10.11.1.1.zip.

• After resolving that error, I then encountered:

System.IO.FileNotFoundException: Could not find file 'C:\Users\abhiseka/.gradle/.../kotlin-android-extensions-runtime-1.7.20.jar'.

• I downloaded the missing files manually and placed them in the required folders, but similar issues continued for other .jar and .aar files.
• Eventually, I was able to download all the required .jar and .aar files except the bindgen and gestures AARs.
• When I try to download them manually, for example:

https://api.mapbox.com/downloads/v2/releases/maven/com/mapbox/bindgen/bindgen/0.2.0/bindgen-0.2.0.aar?access_token=sk.XXXX

• I receive the response:

{"message":"Not Found"}

• I do not have any kind of subscription in my mapbox console account, so do i need any kind of subscription for downloading bindgen and gestures .aars ?

• It would be extremely helpful if you could assist us in obtaining the bindgen and gestures AAR files.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions