maps
maps copied to clipboard
RN 0.66 Could not find com.mapbox.mapboxsdk:mapbox-android-accounts:0.7.0
Describe the bug
After upgrading React Native from 0.63.4 to 0.66 android project does not compile, showing the error:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find com.mapbox.mapboxsdk:mapbox-android-accounts:0.7.0.
Required by:
project :app > project :react-native-mapbox-gl_maps > com.mapbox.mapboxsdk:mapbox-android-sdk:9.1.0
Versions (please complete the following information):
- Platform: Android
- Dev OS: macOS 11.6
- react-native-mapbox-gl Version 8.3.0
- React Native Version 0.66
can you please try with:
android/build.gradle
repositories {
// ...
jcenter()
}
can you please try with:
android/build.gradle
repositories { // ... jcenter() }
Works for me! Thanks
notice, that this is probably just a temporary workaround as jcenter as a dep repo is no longer maintained indefinitely (some time 2022 I believe).
I couldn't get it to work with mavenCentral
unfortunately, although I believe, that mapbox did move their deps there 😕
Is there any update soon to make this library work without jcenter() ?
Is there any update soon to make this library work without jcenter() ?
nah, not in the works atm - feel free to open a PR though.
Also jcenter
not gonna shut down anymore, so that's that 🤷🏿
can you please try with:
android/build.gradle
repositories { // ... jcenter() }
works for me, really thank you
jcenter() is no longer supported in new RN versions
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
jcenter.bintray.com
is consistently returning error codes today. Because of that, we are removing jcenter
from build.gradle
to unblock Android builds locally. Doing so results in the error mentioned in this Issue's original description.
> Could not resolve all files for configuration ':app:dataminrStagingDebugRuntimeClasspath'.
> Could not find com.mapbox.mapboxsdk:mapbox-android-accounts:0.7.0.
Searched in the following locations:
- https://repo.maven.apache.org/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.7.0/mapbox-android-accounts-0.7.0.pom
- https://dl.google.com/dl/android/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.7.0/mapbox-android-accounts-0.7.0.pom
- https://www.jitpack.io/com/mapbox/mapboxsdk/mapbox-android-accounts/0.7.0/mapbox-android-accounts-0.7.0.pom
Required by:
project :app > project :react-native-mapbox-gl_maps > com.mapbox.mapboxsdk:mapbox-android-sdk:9.1.0
Despite the fact that Jfrog says it will maintain it as read-only indefinitely, my team has seen issues where Jcenter + Bintray are unavailable which blocks any new Android builds.
It would be beneficial to move these dependencies to an actively-maintained dependency repository, like mavenCentral
, to avoid the potential pain caused by jcenter
's reliability diminishing over time.
I also saw this Pull Request that references the flakiness of jcenter
in January of this year.
We spent the majority of the morning trying to fix this issue. Seems the conclusion was that jcenter was down and now it is back up. We are using React-Native 0.64.1, because some dependencies have not yet updated, and jcenter was still kept on as read only.
jcenter.bintray.com
is consistently returning error codes today. Because of that, we are removingjcenter
frombuild.gradle
to unblock Android builds locally. Doing so results in the error mentioned in this Issue's original description.> Could not resolve all files for configuration ':app:dataminrStagingDebugRuntimeClasspath'. > Could not find com.mapbox.mapboxsdk:mapbox-android-accounts:0.7.0. Searched in the following locations: - https://repo.maven.apache.org/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.7.0/mapbox-android-accounts-0.7.0.pom - https://dl.google.com/dl/android/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.7.0/mapbox-android-accounts-0.7.0.pom - https://www.jitpack.io/com/mapbox/mapboxsdk/mapbox-android-accounts/0.7.0/mapbox-android-accounts-0.7.0.pom Required by: project :app > project :react-native-mapbox-gl_maps > com.mapbox.mapboxsdk:mapbox-android-sdk:9.1.0
Despite the fact that Jfrog says it will maintain it as read-only indefinitely, my team has seen issues where Jcenter + Bintray are unavailable which blocks any new Android builds.
It would be beneficial to move these dependencies to an actively-maintained dependency repository, like
mavenCentral
, to avoid the potential pain caused byjcenter
's reliability diminishing over time.
Hi we're experiencing the same issue, are you able to resolve the issue by now?
Still not building...Any news or workaround?
Thanks!
The Getting Started docs for Android does explain how to use mavenCentral
over jCenter
for this dependency. It does require more setup to provide the secret access token but should resolve this issue. I have not tried this yet, but it seems like it should work.
I confirm, it's the only way to build right now getting rid of jcenter dependencies. Thanks mate!
PS. Be aware to follow the process of issuing a download token, and everything should be fine!
As @ryanjwessel said, you can get rid of the deprecated jcenter() with a mapbox repo.
This is a step by step guide:
- Authorize here: https://account.mapbox.com/access-tokens/create/
- Check the box "DOWNLOADS:READ" and create a new token.
- Insert into android/gradle.properties your token:
MAPBOX_DOWNLOADS_TOKEN=<here>
- Replace "jcenter()" with "mavenCentral()" in android/build.gradle and put the code under allprojects -> repositories:
maven {
url 'https://api.mapbox.com/downloads/v2/releases/maven'
authentication {
basic(BasicAuthentication)
}
credentials {
// Do not change the username below.
// This should always be `mapbox` (not your username).
username = 'mapbox'
// Use the secret token you stored in gradle.properties as the password
password = project.properties['MAPBOX_DOWNLOADS_TOKEN'] ?: ""
}
}
Doesn't matter if you had maven records before. This should work.
I've followed these instructions to the letter but still no joy
@Dakuan Did you find anyway to fix it ?