maps: 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
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 2
- Comments: 18 (3 by maintainers)
can you please try with:
android/build.gradlenotice, 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
mavenCentralunfortunately, although I believe, that mapbox did move their deps there 😕As @ryanjwessel said, you can get rid of the deprecated jcenter() with a mapbox repo.
This is a step by step guide:
MAPBOX_DOWNLOADS_TOKEN=<here>Doesn’t matter if you had maven records before. This should work.
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.comis consistently returning error codes today. Because of that, we are removingjcenterfrombuild.gradleto unblock Android builds locally. Doing so results in the error mentioned in this Issue’s original description.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.nah, not in the works atm - feel free to open a PR though.
Also
jcenternot gonna shut down anymore, so that’s that 🤷🏿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!
The Getting Started docs for Android does explain how to use
mavenCentraloverjCenterfor 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.