gpt4 book ai didi

Proguard 的 Android Firebase 性能问题

转载 作者:行者123 更新时间:2023-11-29 23:45:54 25 4
gpt4 key购买 nike

我们在项目中实现了 FirebasePerformance,但无法构建项目。我在 Proguard 中遇到以下错误,这与外部库 (qrchart_obfuscation.jar) 中有两个名称相同但大小写不同的类(A.class 和 a.class)有关。我也不太熟悉proguard。

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

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

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

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 性能和混淆器问题的链接,但情况不同 - FirebasePerformance SDK external library issue in progaurd

最佳答案

问题是 qr.android.chart 库在混淆时没有使用 dontusemixedcaseclassnames 选项。

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

您的选择是要么禁用字节码检测,要么请求一个激活了 dontusemixedcaseclassnames 选项的新 qr.android.chart 库。

关于Proguard 的 Android Firebase 性能问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51415603/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com