org.gradle.internal.resolve.ArtifactNotFoundException: Could not find play-services-basement.aar

后端 未结 4 1367
甜味超标
甜味超标 2020-12-06 14:13

I am using 15.0.1 version of Firebase and Google Play Services. The build has started breaking today. How do I fix this? Following is the Gradle logs for refere

4条回答
  •  天命终不由人
    2020-12-06 14:38

    I've had the same issue. For whatever reason the play-services-basement library is no longer available in jcenter: https://jcenter.bintray.com/com/google/android/gms/play-services-basement/15.0.1/play-services-basement-15.0.1.aar

    In the google repository the version 15.0.1 is still available though. You can search the lib here: https://dl.google.com/dl/android/maven2/index.html

    You probably receive the error because you've declared the jcenter() repository before the google() repository. In case a library cannot be resolved in the repository specified first, the build fails with something like this:

    > Could not find play-services-basement.aar (com.google.android.gms:play-services-basement:15.0.1).
      Searched in the following locations:
          https://jcenter.bintray.com/com/google/android/gms/play-services-basement/15.0.1/play-services-basement-15.0.1.aar
    

    Make sure that you declare the google() repository before jcenter() in your build.gradle file and it should work again:

    allprojects {
        repositories {
            google()
            jcenter()
        }
    }
    

提交回复
热议问题