2017-05-26 92 views
7

當整合目前Android Firebase Performance Monitoring(測試版),我在發佈的版本/ O 2017年如下...火力地堡性能測試版/插件建設問題

添加到項目的build.gradle:

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

添加到應用程序build.gradle:

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

您可能會遇到以下構建錯誤。

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

這是由番石榴依賴性不匹配,可以如下,通過修改項目的build.gradle如下解決造成:

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

的火力地堡團隊都意識到這個問題,建議上述解決方法,並將在未來的版本中修復。

把它放在那裏幫助其他人撓頭。

+0

謝謝,面臨同樣的問題。你的解決方案起作用,谷歌也建議同樣的。 –

+0

Perf庫現在位於v11.0.1,但我不確定這是否解決了此問題,因此需要在筆記本電腦上測試它。 – fingertricks

回答

1

此問題已在Firebase插件的1.1.1版本中修復。要使用更新的版本,只需更新您的項目級build.gradle文件如下:

buildscript { 
    repositories { 
     jcenter() 
    } 
    dependencies { 
     classpath ('com.google.firebase:firebase-plugins:1.1.1') 
    } 
}