Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ionic3 Build-Error: Could not find play-services-auth-base.aar (15.0.1)

i have a bigger Ionic3 project running and did not do any changes since i had a successful build last time. Today, i tried to build again, getting the error:

Could not find play-services-auth-base.aar (com.google.android.gms:play-services-auth-base:15.0.1).

I can not figure out why this happens. Cordova-platform is Version 6.3.0.

Steps done so far:

  • Installed cordova-android-play-services-gradle-release, which 15.+ as version during the build

  • Installed cordova-android-support-gradle-release, which 27.+ as version during the build

  • Manipulated gradle.build within the platform, as recommended in other stackoverflow-questions.

  • Maybe updating cordova to 7.x also is an option, but i want to avoid it due to multiple cordova plugin dependencies.

Code:

allprojects {
    repositories {
        jcenter()
        maven {
            url "https://maven.google.com"
        }
    }
}
like image 524
Gary Klasen Avatar asked May 28 '18 10:05

Gary Klasen


2 Answers

There is currently something wrong with the jcenter() repository. I guess they will fix that soon.

Anyway, for the most packages a fix could be to add the google() repository at the first position in the build.gradle file:

buildscript {
  repositories {
    google()
    jcenter()
  }
}

allprojects {
repositories {
    google()
    maven {
        url "https://maven.google.com"
    }
    jcenter()
}

It's important that google() is listed before jcenter().

like image 52
MW. Avatar answered Sep 30 '22 16:09

MW.


If your app does not require any of the newer Google APIs, try specifying an older Play Services Version in your config.xml file. I got a successful build by using 11.6.2. Anything newer gave me the same build error.

like image 25
davyww Avatar answered Sep 30 '22 16:09

davyww