我正在尝试将Firebase Performance SDK添加到我的项目中,但是在构建项目时遇到问题。
所有内容都将在Gradle中同步,不会出现任何问题。不幸的是,我对这里发生的事情一无所知。
有什么想法吗?
谢谢!
内部版本输出会引发以下错误:
Module
Caused by: org.gradle.tooling.BuildException: Failed to process: /…/…/app/build/intermediates/transforms/FirebasePerformancePlugin/dev/75, /…/…/app/build/intermediates/transforms/FirebasePerformancePlugin/dev/86, /…/…/app/build/intermediates/transforms/FirebasePerformancePlugin/dev/87, ................. /…/…/grove_android/app/build/intermediates/transforms/FirebasePerformancePlugin/dev/202, /…/…/app/build/intermediates/transforms/FirebasePerformancePlugin/dev/203
Build.Grade(应用程序)
:app:dexBuilderDev
org.gradle.tooling.BuildException: Failed to process:
/.../.../app/build/intermediates/transforms/FirebasePerformancePlugin/dev/75,
/.../.../app/build/intermediates/transforms/FirebasePerformancePlugin/dev/76,
/.../.../app/build/intermediates/transforms/FirebasePerformancePlugin/dev/77,
………
/.../.../app/build/intermediates/transforms/FirebasePerformancePlugin/dev/201,
/.../.../app/build/intermediates/transforms/FirebasePerformancePlugin/dev/202,
/.../.../app/build/intermediates/transforms/FirebasePerformancePlugin/dev/203
com.android.builder.dexing.DexArchiveBuilderException: Error while dexing. java.lang.IllegalStateException: Unexpected non-class file:
METAINF/versions/9/org/junit/platform/commons/util/ModuleUtils.class Unexpected non-class file: META-INF/versions/9/org/junit/platform/commons/util/ModuleUtils.class
Build.Gradle(项目)
apply plugin: 'com.android.application'
android {
.
.
.
}
dependencies {
.
.
.
implementation 'com.google.firebase:firebase-analytics:17.4.2'
implementation 'com.google.firebase:firebase-crashlytics:17.0.0'
implementation 'com.google.firebase:firebase-database:19.2.1'
implementation 'com.google.firebase:firebase-messaging:20.2.0'
implementation 'com.google.firebase:firebase-config:19.2.0'
implementation 'com.google.firebase:firebase-perf:19.0.8'
.
.
.
}
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.firebase-perf'
答案 0 :(得分:0)
这里也一样。没有找到解决方案,但这里有一个众所周知的解决方法
if (!project.hasProperty("disable-performance-plugin")) {
project.plugins.apply(Plugins.Project.FIREBASE_PERF)
}
然后用
运行你的构建-Pdisable-performance-plugin