android-studiogradle-dependencies

Build errors with Android Studio Koala while works fine with Android Studio Flamingo


I have a new laptop and I'm migrating all my projects from the old laptop to the new one. I'm having problems with Android projects.

On the old laptop I have Android Studio Flamingo | 2022.2.1 installed.

On the new laptop I have Android Studio Koala | 2024.1.1 installed.

I copied the project folder to the new laptop without making any changes to the code and when I build it I get these errors:

* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not find com.firebaseui:firebase-ui-database:1.0.1.
     Searched in the following locations:
       - https://jcenter.bintray.com/com/firebaseui/firebase-ui-database/1.0.1/firebase-ui-database-1.0.1.pom
       - https://maven.google.com/com/firebaseui/firebase-ui-database/1.0.1/firebase-ui-database-1.0.1.pom
       - https://public.repo.sygic.com/repository/maven-sygic-releases/com/firebaseui/firebase-ui-database/1.0.1/firebase-ui-database-1.0.1.pom
       - https://repo.maven.apache.org/maven2/com/firebaseui/firebase-ui-database/1.0.1/firebase-ui-database-1.0.1.pom
       - https://jitpack.io/com/firebaseui/firebase-ui-database/1.0.1/firebase-ui-database-1.0.1.pom
     Required by:
         project :app
   > Could not find com.github.gcacace:signature-pad:1.2.1.
     Searched in the following locations:
       - https://jcenter.bintray.com/com/github/gcacace/signature-pad/1.2.1/signature-pad-1.2.1.pom
       - https://maven.google.com/com/github/gcacace/signature-pad/1.2.1/signature-pad-1.2.1.pom
       - https://public.repo.sygic.com/repository/maven-sygic-releases/com/github/gcacace/signature-pad/1.2.1/signature-pad-1.2.1.pom
       - https://repo.maven.apache.org/maven2/com/github/gcacace/signature-pad/1.2.1/signature-pad-1.2.1.pom
       - https://jitpack.io/com/github/gcacace/signature-pad/1.2.1/signature-pad-1.2.1.pom
     Required by:
         project :app

* 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.

And the same thing with:

Execution failed for task ':app:mergeDebugResources'.
Execution failed for task ':app:processDebugMainManifest'.
Execution failed for task ':app:mergeDebugAssets'.
Execution failed for task ':app:mergeDebugJavaResource'.
Execution failed for task ':app:checkDebugDuplicateClasses'.
Execution failed for task ':app:desugarDebugFileDependencies'.
Execution failed for task ':app:mergeDebugNativeLibs'.
Execution failed for task ':app:processDebugAndroidTestManifest'.
Execution failed for task ':app:checkDebugAndroidTestAarMetadata'.
Execution failed for task ':app:mergeDebugAndroidTestAssets'.
Execution failed for task ':app:checkDebugAndroidTestDuplicateClasses'.

I have these depencencies gradle.build (app) file:

dependencies {
    ...
    implementation 'com.firebaseui:firebase-ui-database:1.0.1'
    ...
    implementation 'com.github.gcacace:signature-pad:1.2.1'
    ...
}

Why am I having this problem?


Solution

  • According to mvnrepository.com `com.firebaseui:firebase-ui-database:1.0.1´ is an artifact that is/was only available from

    https://mvnrepository.com/artifact/com.firebaseui/firebase-ui-database/1.0.1

    As far as I know both repos are now not accessible without authentication:

    Anonymous clients querying /release, /libs-release, /libs-milestone /libs-snapshot, /plugins-release, or any other virtual repository may be denied.

    https://spring.io/blog/2022/12/14/notice-of-permissions-changes-to-repo-spring-io-january-2023

    Unfortunately there is no description what credentials are needed to get access again.

    In your old Android Studio version the build process may have worked as the library was still present in the one of the caches.

    My recommendation would be switching to a version that is present in Maven central like 1.1.0 or a newer version: https://mvnrepository.com/artifact/com.firebaseui/firebase-ui-database/1.1.0

    regarding the artifact com.github.gcacace:signature-pad:1.2.1 consider upgrading to version 1.3.1.