mapbox-maps-flutter icon indicating copy to clipboard operation
mapbox-maps-flutter copied to clipboard

Bug(android): Missing Plugin for 11.4.0

Open supposedlysam-bb opened this issue 1 year ago • 8 comments

When upgrading to 2.0 and running the build for Android I receive


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not resolve com.mapbox.maps:android:11.4.0.
     Required by:
         project :app > project :mapbox_maps_flutter
      > Could not resolve com.mapbox.maps:android:11.4.0.
         > Could not get resource 'https://api.mapbox.com/downloads/v2/releases/maven/com/mapbox/maps/android/11.4.0/android-11.4.0.pom'.
            > Could not GET 'https://api.mapbox.com/downloads/v2/releases/maven/com/mapbox/maps/android/11.4.0/android-11.4.0.pom'. Received status code 403 from server: Forbidden
      > Could not resolve com.mapbox.maps:android:11.4.0.
         > Could not get resource 'https://api.mapbox.com/downloads/v2/snapshots/maven/com/mapbox/maps/android/11.4.0/android-11.4.0.pom'.
            > Could not GET 'https://api.mapbox.com/downloads/v2/snapshots/maven/com/mapbox/maps/android/11.4.0/android-11.4.0.pom'. Received status code 403 from server: Forbidden

* 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

BUILD FAILED in 1m 44s
[!] Gradle threw an error while downloading artifacts from the network.

Is there something I can do to get around this?

supposedlysam-bb avatar Jun 12 '24 20:06 supposedlysam-bb

Hi @supposedlysam-bb, can you double check that you have setup Mapbox download token according to this guide?

You mentioned that this happened when upgrading to MapboxMaps Flutter v2.0, does this mean that you have been using older version of this plugin, with the same download token and it worked?

maios avatar Jun 13 '24 09:06 maios

It looks like it's actually building fine in my CI, but not locally.

Thanks for the link to the Android guide. I opened up the Android guide, then looked at the Flutter readme on the pub but they have conflicting information. Should I be using SDK_REGISTRY_TOKEN or MAPBOX_DOWNLOADS_TOKEN in the ~/.gradle/gradle.properties file?

Side by side of the guide (left) and Flutter pub readme (right) image

supposedlysam-bb avatar Jun 13 '24 17:06 supposedlysam-bb

I have the same error in a new project. I added SDK_REGISTRY_TOKEN=... in Gradle and I tried to use MapboxOptions.setAccessToken. This is my first time using this package. Can help me to fix it?

PrzemyslawPluszowy avatar Jun 13 '24 17:06 PrzemyslawPluszowy

It looks like it's actually building fine in my CI, but not locally.

Thanks for the link to the Android guide. I opened up the Android guide, then looked at the Flutter readme on the pub but they have conflicting information. Should I be using SDK_REGISTRY_TOKEN or MAPBOX_DOWNLOADS_TOKEN in the ~/.gradle/gradle.properties file?

Side by side of the guide (left) and Flutter pub readme (right) image

ok i have it in gardle.propeties use SDK_REGISTRY_TOKEN=

but in android/app/src/main/res/values/strings.xml

create string.xml and inside

<?xml version="1.0" encoding="utf-8"?> <resources xmlns:tools="http://schemas.android.com/tools"> <string name="mapbox_access_token" translatable="false" tools:ignore="UnusedResources">YOUR KEY TOKEN</string> </resources>

documentation on pub dev is incomplete

PrzemyslawPluszowy avatar Jun 13 '24 18:06 PrzemyslawPluszowy

oh when i crated key a mark DOWNLOAD:READ

PrzemyslawPluszowy avatar Jun 13 '24 18:06 PrzemyslawPluszowy

I'm still having trouble getting it to build locally. Is there a debugging technique I can use to better understand what's going on and why I'm receiving a 403 @maios?

supposedlysam-bb avatar Jun 14 '24 16:06 supposedlysam-bb

@supposedlysam-bb did you figure out what the problem is?

dandrykevych avatar Aug 31 '24 13:08 dandrykevych

@supposedlysam-bb did you figure out what the problem is?

I have not

supposedlysam-bb avatar Sep 03 '24 13:09 supposedlysam-bb