mapbox-gl-native icon indicating copy to clipboard operation
mapbox-gl-native copied to clipboard

Gradle sync failed. Received status code 401 from server: Unauthorized

Open MakarovMVict opened this issue 4 years ago • 2 comments

I am trying to import a project into a gradle(MapboxGLAndroidSDKTestApp), an error occurs "Gradle sync failed: Could not GET 'https://api.mapbox.com/downloads/v2/releases/maven/com/mapbox/gradle/plugins/sdk-registry/0.3.0/sdk-registry-0.3.0.pom'. Received status code 401 from server: Unauthorized". I am logged in at https://www.mapbox.com and I have a key. I put this key into DEFAULT_MAPBOX_ACCESS_TOKEN, but it didnt helped.I replaced SDK_REGISTRY_TOKEN with my token from account in gradle.build , but it didnt help credentials { username "mapbox" password = project.hasProperty('SDK_REGISTRY_TOKEN') ? project.property('SDK_REGISTRY_TOKEN') : System.getenv('SDK_REGISTRY_TOKEN') }

MakarovMVict avatar Jan 25 '21 13:01 MakarovMVict

also reported in https://github.com/mapbox/mapbox-gl-native-android/issues/614 . Seems like an important issue in the fact that we can't update our dependencies...

Progdrasil avatar Apr 08 '21 19:04 Progdrasil

read the passages carefully

From the token creation page, give your token a name and make sure the box next to the Downloads:Read scope is checked

Ra1Ca7eM avatar May 24 '21 08:05 Ra1Ca7eM