Firebase Performance Beta / Plugin build issue
Asked Answered
N

1

7

When integrating the current Android Firebase Performance Monitoring (beta) version released during I/O 2017 as follows...

Add to project build.gradle:

dependencies {
    classpath 'com.google.firebase:firebase-plugins:1.1.0'
}

Add to app build.gradle:

dependencies {
    compile 'com.google.firebase:firebase-perf:10.2.6'
}

You may come across the following build error.

Error:Execution failed for task ':app:packageDebug'.
> com.google.common.util.concurrent.MoreExecutors.directExecutor()Ljava/util/concurrent/Executor;

This is caused by a Guava dependency mismatch, which can be resolved as follows, by modifying the project build.gradle as follows:

dependencies {
    classpath ('com.google.firebase:firebase-plugins:1.1.0') {
                exclude group: 'com.google.guava', module: 'guava-jdk5'
            }
    }

The Firebase team are aware of this issue, suggested the above workaround and will be fixing in a future release.

Putting this out there to help anyone else scratching their head.

Newkirk answered 26/5, 2017 at 22:59 Comment(2)
Thanks, faced same issue. Your solutions works and Google also suggested same.Disuse
The Perf library is now at v11.0.1 but I'm not sure if this addresses this issue or not, need to test it when I'm on my laptop.Newkirk
E
1

This issue was fixed in version 1.1.1 of firebase plugins. To use the updated version just update your project-level build.gradle file as follows:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath ('com.google.firebase:firebase-plugins:1.1.1')
    }
}
Exudation answered 18/9, 2017 at 8:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.