Firebase performance configuration does not work with v1.1.2 when using implementation or api

I am trying to upgrade the firebase-plugins dependency version to 1.1.2 , which supports the Android version of the Gradle 3+ plugin, but the Gradle build configuration continues to fail if I do not use the compile , which is deprecated, I use the Service Services version 11.4.2 , and I have there is a firebase-perf dependency added so that it doesn’t work:

 implementation "com.google.firebase:firebase-perf:$playServicesVersion" 

The only way to fix this is to change the above implementation to compile . Has anyone found a solution to get around this? (Besides downgrading to firebase-plugins version 1.1.0-alpha1 ?)

This is where the error message appears:

 * What went wrong: A problem occurred configuring project ':app'. > To use the Firebase Performance Plugin, the Firebase Performance Monitoring SDK must be added to the app build.gradle. Please add compile 'com.google.firebase:f irebase-perf:VERSION_NUMBER_GREATER_THAN_OR_EQUAL_TO_11.0.4' to the app build.gradle. 

Edit: this has been fixed in firebase-plugins:1.1.3 .

+5
source share
1 answer

This error is because the firebase-perf plugin specifically looks for a “compilation” configuration for com.google.firebase: firebase-perf SDK. If the SDK is not included in build.gradle during build, there will be a crash later.

Android Studio 3.0 replaces the “compilation” with the “implementation”; instead, the plugin code should check the configuration of the “implementation” for the firebase-perf SDK.

The workaround now is to continue using: compile "com.google.firebase: firebase-perf: $ playServicesVersion"

This will be fixed in a future release of firebase-plugins.

+5
source

Source: https://habr.com/ru/post/1273112/


All Articles