Proguard的Android FirebasePerformance问题

Proguard的Android FirebasePerformance问题,android,android-proguard,firebase-performance,Android,Android Proguard,Firebase Performance,我们在项目中实施了FirebasePerformance,并且在无法构建项目时实施了FirebasePerformance。下面是Proguard中的错误,它与外部库(qrchart_obfusation.jar)中有两个名称相同但大小写不同的类(a.class和a.class)有关。我对proguard也不是很熟悉 通过阅读资料,我希望在proguard中添加-dontwarn选项,但这将是我最后的选择,因为资料说“只有当你知道你在做什么时才使用它” 我仍然尝试添加-dontwarn qr.a

我们在项目中实施了FirebasePerformance,并且在无法构建项目时实施了FirebasePerformance。下面是Proguard中的错误,它与外部库(qrchart_obfusation.jar)中有两个名称相同但大小写不同的类(a.class和a.class)有关。我对proguard也不是很熟悉

通过阅读资料,我希望在proguard中添加-dontwarn选项,但这将是我最后的选择,因为资料说“只有当你知道你在做什么时才使用它”

我仍然尝试添加
-dontwarn qr.android.chart
,并将Mapping.txt与我以前没有FirebasePerformance的版本进行了比较,我发现类(qr.android.chart)存在差异,不确定此细节是否有帮助

感谢您对proguard FirebasePerformance设置的帮助和建议

Reading program directory [C:\...\build\intermediates\transforms\FirebasePerformancePlugin\adevelop\release\4] (filtered)

Warning: class [qr/android/chart/b/a.class] unexpectedly contains class [qr.android.chart.b.A]
Warning: class [qr/android/chart/b/b.class] unexpectedly contains class [qr.android.chart.b.B]
Warning: class [qr/android/chart/b/c.class] unexpectedly contains class [qr.android.chart.b.C]
Warning: class [qr/android/chart/b/d.class] unexpectedly contains class [qr.android.chart.b.D]
Warning: class [qr/android/chart/b/e.class] unexpectedly contains class [qr.android.chart.b.E]
Warning: class [qr/android/chart/b/f.class] unexpectedly contains class [qr.android.chart.b.F]
Warning: class [qr/android/chart/b/g.class] unexpectedly contains class [qr.android.chart.b.G]
Warning: class [qr/android/chart/b/h.class] unexpectedly contains class [qr.android.chart.b.H]
Warning: class [qr/android/chart/b/i.class] unexpectedly contains class [qr.android.chart.b.I]
Warning: class [qr/android/chart/b/j.class] unexpectedly contains class [qr.android.chart.b.J]
Warning: class [qr/android/chart/b/k.class] unexpectedly contains class [qr.android.chart.b.K]

Warning: there were 11 classes in incorrectly named files.
         You should make sure all file names correspond to their class names.
         The directory hierarchies must correspond to the package hierarchies.
         (http://proguard.sourceforge.net/manual/troubleshooting.html#unexpectedclass)
         If you don't mind the mentioned classes not being written out,
         you could try your luck using the '-ignorewarnings' option.

我在已签名APK的构建过程中看到了有关Firebase性能和proguard问题的链接,但情况不同-

问题在于,在proguard时,qr.android.chart库没有使用dontusemixedcaseclassnames选项

在构建不区分大小写的文件系统(即Mac OSX喜欢使用的文件系统)时,Firebase性能使用的字节码检测过程会遇到问题,因为未归档的类最终会相互覆盖


您可以选择禁用字节码插装,或者在激活dontusemixedcaseclassnames选项的情况下请求新的qr.android.chart库。

如果您正在使用macOS,我发现了一个很难解决的方法。创建一个区分大小写的磁盘映像并将项目复制到那里,这样firebase perf plugin就可以处理区分大小写的文件

如何在此处创建磁盘映像:

对于我的项目,我需要一个5gb的图像