cordova-plugin-firebase: Build does not work for Android on Ionic 3

Hi friends,

I have spent many time with this issue,

Please, Could you help me?

Thanks,

ERROR INFO `FAILURE: Build failed with an exception.

  • What went wrong: Could not resolve all files for configuration ‘:app:debugCompileClasspath’.

Could not find any version that matches com.google.android.gms:play-services-flags:12.+. Versions that do not match: 15.0.1 15.0.0 Searched in the following locations: file:/Users/wilfredonoyola/Library/Android/sdk/extras/m2repository/com/google/android/gms/play-services-flags/maven-metadata.xml file:/Users/wilfredonoyola/Library/Android/sdk/extras/m2repository/com/google/android/gms/play-services-flags/ file:/Users/wilfredonoyola/Library/Android/sdk/extras/google/m2repository/com/google/android/gms/play-services-flags/maven-metadata.xml file:/Users/wilfredonoyola/Library/Android/sdk/extras/google/m2repository/com/google/android/gms/play-services-flags/ file:/Users/wilfredonoyola/Library/Android/sdk/extras/android/m2repository/com/google/android/gms/play-services-flags/maven-metadata.xml file:/Users/wilfredonoyola/Library/Android/sdk/extras/android/m2repository/com/google/android/gms/play-services-flags/ https://jcenter.bintray.com/com/google/android/gms/play-services-flags/maven-metadata.xml https://jcenter.bintray.com/com/google/android/gms/play-services-flags/ https://maven.google.com/com/google/android/gms/play-services-flags/maven-metadata.xml https://repo1.maven.org/maven2/com/google/android/gms/play-services-flags/maven-metadata.xml https://repo1.maven.org/maven2/com/google/android/gms/play-services-flags/ file:/Users/wilfredonoyola/workspace/statusfy/sf-ionic-1/platforms/android/app/src/main/libs/ file:/Users/wilfredonoyola/workspace/statusfy/sf-ionic-1/platforms/android/app/libs/ Required by: project :app > com.google.firebase:firebase-crash:16.0.1 project :app > com.google.firebase:firebase-auth:16.0.2 Could not find any version that matches com.google.android.gms:play-services-measurement-base:12.+.`

Ionic info: `cli packages: (/Users/wilfredonoyola/workspace/statusfy/sf-ionic-1/node_modules)

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 8.0.0 

local packages:

@ionic/app-scripts : 3.1.10
Cordova Platforms  : android 7.0.0
Ionic Framework    : ionic-angular 3.9.2

System:

Android SDK Tools : 26.1.1
ios-deploy        : 1.9.2 
Node              : v6.11.3
npm               : 3.10.10 
OS                : macOS High Sierra
Xcode             : Xcode 9.4.1 Build version 9F2000 

Environment Variables:

ANDROID_HOME : /Users/wilfredonoyola/Library/Android/sdk/

Misc:

backend : pro`

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (1 by maintainers)

Most upvoted comments

The problem is with the ( com.google.android.gms:play-services-flags:12.+.) any library that you import must not have the “+”; you have to specify one specific version and ensure that there are no conflicts with other libraries.

For example, if you import: com.google.android.gms:play-services-auth:11.0.4 com.google.android.gms:play-services-identity:11.0.4

They all must have the same version. If not you will get errors.

Some times you have to choose a lower version to achieve this, for example I use the 11.0.4 because greater ones gave me errors.