1
votes

So building was always fine until it wasn't. Nothing new was added, nothing was removed, no packages installed, nothing. Everything was working fine until the build issues happened. This is the full error report

> Configure project :app
Error 'Plugin-Version' of 'unspecified' for 'com.android.build.gradle.AppPlugin@4aae70b2' is not a valid version number

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
   > Could not resolve com.google.android.gms:play-services-ads-identifier:[15.0.0, 16.0.99].
     Required by:
         project :app > com.onesignal:OneSignal:3.16.0
      > Failed to list versions for com.google.android.gms:play-services-ads-identifier.
         > Could not list versions using M2 pattern 'https://jcenter.bintray.com/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier])(.[ext])'.
            > Could not get resource 'https://jcenter.bintray.com/com/google/android/gms/play-services-ads-identifier/'.
               > Could not GET 'https://jcenter.bintray.com/com/google/android/gms/play-services-ads-identifier/'.
                  > org.apache.http.client.ClientProtocolException (no error message)
      > Failed to list versions for com.google.android.gms:play-services-ads-identifier.
         > Could not list versions using M2 pattern 'https://jcenter.bintray.com/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier])(.[ext])'.
            > Could not get resource 'https://jcenter.bintray.com/com/google/android/gms/play-services-ads-identifier/'.
               > Could not GET 'https://jcenter.bintray.com/com/google/android/gms/play-services-ads-identifier/'.
                  > org.apache.http.client.ClientProtocolException (no error message)
   > Could not resolve com.google.android.gms:play-services-basement:[15.0.1,16.0.0).
     Required by:
         project :app > com.google.android.gms:play-services-location:15.0.1
         project :app > com.google.android.gms:play-services-places-placereport:15.0.1
      > Failed to list versions for com.google.android.gms:play-services-basement.
         > Could not list versions using M2 pattern 'https://jcenter.bintray.com/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier])(.[ext])'.
            > Could not get resource 'https://jcenter.bintray.com/com/google/android/gms/play-services-basement/'.
               > Could not GET 'https://jcenter.bintray.com/com/google/android/gms/play-services-basement/'.
                  > org.apache.http.client.ClientProtocolException (no error message)
      > Failed to list versions for com.google.android.gms:play-services-basement.
         > Could not list versions using M2 pattern 'https://jcenter.bintray.com/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier])(.[ext])'.
            > Could not get resource 'https://jcenter.bintray.com/com/google/android/gms/play-services-basement/'.
               > Could not GET 'https://jcenter.bintray.com/com/google/android/gms/play-services-basement/'.
                  > org.apache.http.client.ClientProtocolException (no error message)
   > Could not resolve com.google.android.gms:play-services-tasks:[15.0.1,16.0.0).
     Required by:
         project :app > com.google.android.gms:play-services-location:15.0.1
      > Failed to list versions for com.google.android.gms:play-services-tasks.
         > Could not list versions using M2 pattern 'https://jcenter.bintray.com/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier])(.[ext])'.
            > Could not get resource 'https://jcenter.bintray.com/com/google/android/gms/play-services-tasks/'.
               > Could not GET 'https://jcenter.bintray.com/com/google/android/gms/play-services-tasks/'.
                  > org.apache.http.client.ClientProtocolException (no error message)
      > Failed to list versions for com.google.android.gms:play-services-tasks.
         > Could not list versions using M2 pattern 'https://jcenter.bintray.com/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier])(.[ext])'.
            > Could not get resource 'https://jcenter.bintray.com/com/google/android/gms/play-services-tasks/'.
               > Could not GET 'https://jcenter.bintray.com/com/google/android/gms/play-services-tasks/'.
                  > org.apache.http.client.ClientProtocolException (no error message)

* 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

Any ideas on what could be causing this? I tried the following but nothing resolved the issue:

  • Re-installing npm package after uninstalling them + reinitializing platforms and plugins
  • Updating gradle from 7.2 to 7.4.2
  • Removing OneSignal plugin
1

1 Answers

0
votes

try replace

jcenter()

with this:

mavenCentral()

and see this issue JCenter deprecation; impact on Gradle and Android