apply plugin: 'com.google.firebase.firebase-perf'
当我运行“build”脚本时,我收到以下警告信息:这是什么问题呢?我已经更新了所有插件、Play服务和Android Studio,但是没有成功。/transforms/FirebasePerformancePlugin/dev/debug/174/module-info.class: D8:不支持的源文件类型
apply plugin: 'com.google.firebase.firebase-perf'
当我运行“build”脚本时,我收到以下警告信息:这是什么问题呢?我已经更新了所有插件、Play服务和Android Studio,但是没有成功。/transforms/FirebasePerformancePlugin/dev/debug/174/module-info.class: D8:不支持的源文件类型
更新:Android Gradle插件3.5.0已经修复了这个问题。请参见此问题和此问题,它们都已经修复。
(不幸的是,在我的项目中,这个其他问题即使在3.5.3版本中仍然存在。)
更新了公司内部库依赖后,我开始遇到相同的错误,但即使回退到更新前的状态,仍然会出现这个错误。非常奇怪!
> Task :app:transformClassesAndResourcesWithR8ForBetaRelease FAILED
R8 is the new Android code shrinker. If you experience any issues, please file a bug at
https://issuetracker.google.com, using 'Shrinker (R8)' as component name. You can
disable R8 by updating gradle.properties with 'android.enableR8=false'.
.../transforms/FirebasePerformancePlugin/beta/release/66/module-info.class:
D8: Unsupported source file type
我发现唯一能帮助的就是按照Gradle构建输出提示,暂时切换回ProGuard:
android.enableR8=false
关闭 Firebase-performance 插件。
Android Studio 3.6 Canary 1 也存在这个问题。
我没有找到其他方式来发布构建我的项目。
我通过以下三个步骤解决了这个问题:
1.更新 "distributionUrl=https://services.gradle.org/distributions/gradle-5.6.4-all.zip"
2.更新 "classpath "com.android.tools.build:gradle:3.6.3"
3.更新 Studio 3.6.3
另一种方式(我不太喜欢它)
//apply plugin: 'com.google.firebase.firebase-perf'
... //classpath "com.google.firebase:perf-plugin:1.3.1"