cordova-plugin-firebase-analytics: Could not get unknown property 'FIREBASE_VERSION' for object of type

* What went wrong:
A problem occurred evaluating root project 'android'.
> Could not get unknown property 'FIREBASE_VERSION' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

`cli packages: (/Users/michael/Documents/sites/laravel/hybrid/node_modules)

@ionic/cli-utils  : 1.7.0
ionic (Ionic CLI) : 3.7.0

global packages:

Cordova CLI : 7.0.1 

local packages:

@ionic/app-scripts              : 1.3.12
@ionic/cli-plugin-cordova       : 1.4.1
@ionic/cli-plugin-ionic-angular : 1.3.2
Cordova Platforms               : android 6.2.3 browser 4.1.0 ios 4.4.0
Ionic Framework                 : ionic-angular 3.0.1

`

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 22 (1 by maintainers)

Most upvoted comments

Edit your project.properties file and explicitly add the version.

From: cordova.system.library.7=com.google.firebase:firebase-dynamic-links:$FIREBASE_VERSION To: cordova.system.library.7=com.google.firebase:firebase-dynamic-links:11.0.+

Also best to ensure that you update your firebase core/messaging and play-services to the same version:

cordova.system.library.3=com.google.firebase:firebase-core:11.0.+
cordova.system.library.4=com.google.firebase:firebase-messaging:11.0.+
cordova.system.library.5=com.google.android.gms:play-services-auth:11.0.+
cordova.system.library.6=com.google.android.gms:play-services-identity:11.0.+

After making these changes I ran into another error: Cannot add task ':processArmv7DebugGoogleServices' as a task with that name already exists.

This means there is a duplicate task to do the same thing… To fix this, simply comment out the task in the plugin file of /platforms/android/cordova-support-google-services/APPNAME-build.gradle

//ext.postBuildExtras = {
//    apply plugin: com.google.gms.googleservices.GoogleServicesPlugin
//}

As @Darkarmour said, I downgraded to version 0.12.0

cordova plugin rm cordova-plugin-firebase-analytics --save
cordova plugin add cordova-plugin-firebase-analytics@0.12.0 --save

I’m also still facing this error. Removing and adding the firebase plugins or android platform didn’t work. Neither did adding “classpath ‘com.google.gms:google-services:3.0.0’” to the top level build.gradle dependencies. Any other suggestions?