I have 2 projects which have the same gradle settings regarding the mapbox in general and one of them works completely fine and the other does not work at all the error which gets written into logs within the build time is pretty known: > Could not find com.mapbox.mapboxsdk:mapbox-android-accounts:0.7.0. Very similar question is even here, i am not able to resolve the error even using jcenter() as it is mentioned in the question mentioned above. In both projects I am using jetpack compose in similar way.
Code snippet(project gradle):
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['MB_TOKEN'] ?: ""
}
}
Module gradle:
implementation("com.mapbox.mapboxsdk:mapbox-android-telemetry:7.0.0")
implementation('com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v9:0.9.0')
implementation('com.mapbox.mapboxsdk:mapbox-android-plugin-markerview-v9:0.4.0')
implementation("com.mapbox.mapboxsdk:mapbox-sdk-geojson:5.8.0")
implementation("com.mapbox.mapboxsdk:mapbox-android-accounts:0.8.0")
Full build message:
Executing tasks: [:app:assembleDebug] in project /home/lzajicek/AndroidStudioProjects/loci
Starting Gradle Daemon...
Gradle Daemon started in 1 s 199 ms
> Task :app:preBuild UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :app:compileDebugAidl NO-SOURCE
> Task :app:compileDebugRenderscript NO-SOURCE
> Task :app:generateDebugBuildConfig UP-TO-DATE
> Task :app:generateDebugDatabaseInterface UP-TO-DATE
> Task :app:checkDebugAarMetadata FAILED
> Task :app:generateDebugResValues UP-TO-DATE
> Task :app:generateDebugResources UP-TO-DATE
> Task :app:mergeDebugResources FAILED
> Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
> Task :app:extractDeepLinksDebug UP-TO-DATE
> Task :app:processDebugMainManifest FAILED
> Task :app:javaPreCompileDebug UP-TO-DATE
> Task :app:mergeDebugNativeDebugMetadata NO-SOURCE
> Task :app:mergeDebugShaders UP-TO-DATE
> Task :app:compileDebugShaders NO-SOURCE
> Task :app:generateDebugAssets UP-TO-DATE
> Task :app:mergeDebugAssets FAILED
> Task :app:processDebugJavaRes NO-SOURCE
> Task :app:checkDebugDuplicateClasses FAILED
> Task :app:desugarDebugFileDependencies FAILED
> Task :app:mergeDebugJniLibFolders UP-TO-DATE
> Task :app:mergeDebugNativeLibs FAILED
> Task :app:validateSigningDebug UP-TO-DATE
> Task :app:writeDebugAppMetadata UP-TO-DATE
> Task :app:writeDebugSigningConfigVersions UP-TO-DATE
FAILURE: Build completed with 7 failures.
1: Task failed with an exception.
-----------
* What went wrong:
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.8.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.8.0/mapbox-android-accounts-0.8.0.pom
- https://repo.maven.apache.org/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.8.0/mapbox-android-accounts-0.8.0.pom
Required by:
project :app
> Could not find com.mapbox.mapboxsdk:mapbox-android-accounts:0.8.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.8.0/mapbox-android-accounts-0.8.0.pom
- https://repo.maven.apache.org/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.8.0/mapbox-android-accounts-0.8.0.pom
Required by:
project :app > com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v9:0.9.0 > com.mapbox.mapboxsdk:mapbox-android-sdk:9.2.0
* 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.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find com.mapbox.mapboxsdk:mapbox-android-accounts:0.8.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.8.0/mapbox-android-accounts-0.8.0.pom
- https://repo.maven.apache.org/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.8.0/mapbox-android-accounts-0.8.0.pom
Required by:
project :app
> Could not find com.mapbox.mapboxsdk:mapbox-android-accounts:0.8.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.8.0/mapbox-android-accounts-0.8.0.pom
- https://repo.maven.apache.org/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.8.0/mapbox-android-accounts-0.8.0.pom
Required by:
project :app > com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v9:0.9.0 > com.mapbox.mapboxsdk:mapbox-android-sdk:9.2.0
* 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.
==============================================================================
3: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find com.mapbox.mapboxsdk:mapbox-android-accounts:0.8.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.8.0/mapbox-android-accounts-0.8.0.pom
- https://repo.maven.apache.org/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.8.0/mapbox-android-accounts-0.8.0.pom
Required by:
project :app
> Could not find com.mapbox.mapboxsdk:mapbox-android-accounts:0.8.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.8.0/mapbox-android-accounts-0.8.0.pom
- https://repo.maven.apache.org/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.8.0/mapbox-android-accounts-0.8.0.pom
Required by:
project :app > com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v9:0.9.0 > com.mapbox.mapboxsdk:mapbox-android-sdk:9.2.0
* 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.
==============================================================================
4: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeDebugAssets'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find com.mapbox.mapboxsdk:mapbox-android-accounts:0.8.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.8.0/mapbox-android-accounts-0.8.0.pom
- https://repo.maven.apache.org/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.8.0/mapbox-android-accounts-0.8.0.pom
Required by:
project :app
> Could not find com.mapbox.mapboxsdk:mapbox-android-accounts:0.8.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.8.0/mapbox-android-accounts-0.8.0.pom
- https://repo.maven.apache.org/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.8.0/mapbox-android-accounts-0.8.0.pom
Required by:
project :app > com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v9:0.9.0 > com.mapbox.mapboxsdk:mapbox-android-sdk:9.2.0
* 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.
==============================================================================
5: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find com.mapbox.mapboxsdk:mapbox-android-accounts:0.8.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.8.0/mapbox-android-accounts-0.8.0.pom
- https://repo.maven.apache.org/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.8.0/mapbox-android-accounts-0.8.0.pom
Required by:
project :app
> Could not find com.mapbox.mapboxsdk:mapbox-android-accounts:0.8.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.8.0/mapbox-android-accounts-0.8.0.pom
- https://repo.maven.apache.org/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.8.0/mapbox-android-accounts-0.8.0.pom
Required by:
project :app > com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v9:0.9.0 > com.mapbox.mapboxsdk:mapbox-android-sdk:9.2.0
* 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.
==============================================================================
6: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:desugarDebugFileDependencies'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find com.mapbox.mapboxsdk:mapbox-android-accounts:0.8.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.8.0/mapbox-android-accounts-0.8.0.pom
- https://repo.maven.apache.org/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.8.0/mapbox-android-accounts-0.8.0.pom
Required by:
project :app
> Could not find com.mapbox.mapboxsdk:mapbox-android-accounts:0.8.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.8.0/mapbox-android-accounts-0.8.0.pom
- https://repo.maven.apache.org/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.8.0/mapbox-android-accounts-0.8.0.pom
Required by:
project :app > com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v9:0.9.0 > com.mapbox.mapboxsdk:mapbox-android-sdk:9.2.0
* 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.
==============================================================================
7: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeDebugNativeLibs'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find com.mapbox.mapboxsdk:mapbox-android-accounts:0.8.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.8.0/mapbox-android-accounts-0.8.0.pom
- https://repo.maven.apache.org/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.8.0/mapbox-android-accounts-0.8.0.pom
Required by:
project :app
> Could not find com.mapbox.mapboxsdk:mapbox-android-accounts:0.8.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.8.0/mapbox-android-accounts-0.8.0.pom
- https://repo.maven.apache.org/maven2/com/mapbox/mapboxsdk/mapbox-android-accounts/0.8.0/mapbox-android-accounts-0.8.0.pom
Required by:
project :app > com.mapbox.mapboxsdk:mapbox-android-plugin-annotation-v9:0.9.0 > com.mapbox.mapboxsdk:mapbox-android-sdk:9.2.0
* 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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/7.0.2/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 1m 0s
18 actionable tasks: 7 executed, 11 up-to-date
Warning message after syncing gradle configurations:
Failed to resolve: com.mapbox.mapboxsdk:mapbox-android-accounts:0.8.0
Show in Project Structure dialog
Affected Modules: app
Does anyone have any idea where the twist is? In neither of them i use jcenter(), but i tried it in the one which is not working and it did not help either. Any help would be appreciated
CodePudding user response:
I've tried it myself and I'm also getting the same errors without adding
jcenter()
repository. But after adding jcenter(), it works fine.
Most probably you are adding the jcenter() repository at wrong place. In Android Studio Arctic Fox version the,
allProjects {}
block is moved to settings.gradle file and this where you should add the jcenter() repository.
This is how new settings.gradle file now looks like,
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
jcenter() // Warning: this repository is going to shut down soon
}
}
rootProject.name = "TinderLikeSwipeCardsJetpackCompose"
include ':app'