Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug(android): Missing Plugin for 11.4.0 #580

Open
supposedlysam-bb opened this issue Jun 12, 2024 · 6 comments
Open

Bug(android): Missing Plugin for 11.4.0 #580

supposedlysam-bb opened this issue Jun 12, 2024 · 6 comments

Comments

@supposedlysam-bb
Copy link

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?

@maios
Copy link
Contributor

maios commented Jun 13, 2024

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?

@supposedlysam-bb
Copy link
Author

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

@PrzemyslawPluszowy
Copy link

PrzemyslawPluszowy commented Jun 13, 2024

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
Copy link

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
Copy link

oh when i crated key a mark DOWNLOAD:READ

@supposedlysam-bb
Copy link
Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants