Jcenter is down: Not able to build the Android APK

Not able to build the APK it shows below error, before 2 days, the same was properly build. but now it shows below error

UserError: FAILURE: Build failed with an exception. 
* What went wrong: Could not determine the dependencies of task ':app:compileReleaseJavaWithJavac'. 
> Could not resolve all task dependencies for configuration ':app:releaseCompileClasspath'. 
See log for full details.

Log Details

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:compileReleaseJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:releaseCompileClasspath'.
   > Could not resolve com.commit451:PhotoView:1.2.4.
     Required by:
         project :app
      > Skipped due to earlier error
      > Skipped due to earlier error
      > Skipped due to earlier error
      > Skipped due to earlier error

* 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

BUILD FAILED in 1m 41s
Command failed with exit code 1: /platforms/android/gradlew cdvBuildRelease -b /platforms/android/build.gradle

2022-10-31 15:12:48,148 - FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:compileReleaseJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:releaseCompileClasspath'.
See log for full details.
2022-10-31 15:12:48,149 - Build failed 75e9d542-23f4-44e7-bbe8-837edc2a608a
2022-10-31 15:12:49,340 - Output: Package                       Current  Wanted  Latest  Location                                   Depended by
cordova-android                 9.1.0   9.1.0  11.0.0  node_modules/cordova-android               75e9d542-23f4-44e7-bbe8-837edc2a608a
cordova-plugin-camera           5.0.3   5.0.3   6.0.0  node_modules/cordova-plugin-camera         75e9d542-23f4-44e7-bbe8-837edc2a608a
cordova-plugin-file             6.0.2   6.0.2   7.0.0  node_modules/cordova-plugin-file           75e9d542-23f4-44e7-bbe8-837edc2a608a
cordova-plugin-media            5.0.4   5.0.4   6.1.0  node_modules/cordova-plugin-media          75e9d542-23f4-44e7-bbe8-837edc2a608a
cordova-plugin-media-capture    3.0.3   3.0.3   4.0.0  node_modules/cordova-plugin-media-capture  75e9d542-23f4-44e7-bbe8-837edc2a608a
cordova.plugins.diagnostic      6.1.1   6.1.1   7.1.1  node_modules/cordova.plugins.diagnostic    75e9d542-23f4-44e7-bbe8-837edc2a608a
1 Like

I pulled your look to look at the full details. Here are some of the messages I saw:

Discovered plugin "cordova-plugin-androidx". Adding it to the project
Installing "cordova-plugin-androidx" for android
Plugin doesn't support this project's cordova-android version. cordova-android: 9.1.0, failed version requirement: <9.0.0
Discovered plugin "cordova-plugin-media". Adding it to the project
Unmet project requirements for latest version of cordova-plugin-media:
    cordova-android (9.1.0 in project, >=10.0.0 required)
Discovered plugin "cordova-plugin-media-capture". Adding it to the project
Unmet project requirements for latest version of cordova-plugin-media-capture:
    cordova-android (9.1.0 in project, >=10.0.0 required)
Discovered plugin "cordova-plugin-file". Adding it to the project
Unmet project requirements for latest version of cordova-plugin-file:
    cordova-android (9.1.0 in project, >=10.0.0 required)
Fetching highest version of cordova-plugin-file that this project supports: 6.0.2 (latest is 7.0.0)
Discovered plugin "cordova-plugin-camera". Adding it to the project
Unmet project requirements for latest version of cordova-plugin-camera:
    cordova-android (9.1.0 in project, >=10.0.0 required)
Fetching highest version of cordova-plugin-camera that this project supports: 5.0.3 (latest is 6.0.0)

There are other warnings as well.

The most serious one is this:

* What went wrong:
Could not determine the dependencies of task ':app:compileReleaseJavaWithJavac'.
> Could not resolve all dependencies for configuration ':app:releaseRuntimeClasspath'.
   > Could not determine artifacts for com.commit451:PhotoView:1.2.4
      > Could not get resource 'https://jcenter.bintray.com/com/commit451/PhotoView/1.2.4/PhotoView-1.2.4.aar'.
         > Could not HEAD 'https://jcenter.bintray.com/com/commit451/PhotoView/1.2.4/PhotoView-1.2.4.aar'.
            > Read timed out

It’s referencing Jcenter, which was deprecated in March, 2021. While it has continued to work, developers are encouraged to migrate away from it. Other users (not using VoltBuilder) are also running into this.

You may need to check with the developer of com-sarriaroman-photoviewer to see what they are doing about the problem. There are open issues about this here.

We also recommend updating your project to use the current libraries and build for Android 12.

I have the same problem

@kendol - yes, you have a similar issue:

* What went wrong:
Could not determine the dependencies of task ':app:collectReleaseDependencies'.
> Could not resolve all task dependencies for configuration ':app:releaseRuntimeClasspath'.
   > Could not resolve com.google.android.play:core:1.8.+.
     Required by:
         project :app
      > Failed to list versions for com.google.android.play:core.
         > Unable to load Maven meta-data from https://jcenter.bintray.com/com/google/android/play/core/maven-metadata.xml.
            > Could not get resource 'https://jcenter.bintray.com/com/google/android/play/core/maven-metadata.xml'.
               > Could not GET 'https://jcenter.bintray.com/com/google/android/play/core/maven-metadata.xml'.
                  > Read timed out

You also have a plugin which is trying to access Jcenter.

I have to update the version of cordova and remove the plugin that uses jcenter?

Yes, unless Jcenter comes back up. Jcenter is completely unrelated to us - in fact, any project which uses plugins that depend on Jcenter will have this problem, no matter how they are built.

Here is more information:

It looks like Jcenter has resolved its problems. Can you try submitting again?

1 Like