启用proguard后,碰撞线号不正确

发布于 2025-01-27 06:03:44 字数 846 浏览 2 评论 0原文

启用proguard后,碰撞线编号无法正确显示 我的HAP已发布到Google Play和应用程序中的用户崩溃,在我的Crash Reporter中,崩溃线号未知且不正确

java.lang.NullPointerException: null
at io.kuknos.messenger.fragments.NewWalletFragment$r$b.run(SourceFile:3)
at android.app.Activity.runOnUiThread(Activity.java:7154)
at io.kuknos.messenger.fragments.NewWalletFragment$r.a(SourceFile:5)
at z9.j$k0.a(SourceFile:10)
at z0.n.m(SourceFile:2)
at z0.e$b.run(SourceFile:5)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:246)
at android.app.ActivityThread.main(ActivityThread.java:8653)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)

after enabling proguard,crash line number doesn show correctly
my hap has been published to google play and a user crash inside app,in my crash reporter,the crash line number is unknown and incorrect

java.lang.NullPointerException: null
at io.kuknos.messenger.fragments.NewWalletFragment$r$b.run(SourceFile:3)
at android.app.Activity.runOnUiThread(Activity.java:7154)
at io.kuknos.messenger.fragments.NewWalletFragment$r.a(SourceFile:5)
at z9.j$k0.a(SourceFile:10)
at z0.n.m(SourceFile:2)
at z0.e$b.run(SourceFile:5)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:246)
at android.app.ActivityThread.main(ActivityThread.java:8653)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

绝不放开 2025-02-03 06:03:44

将以下行添加到您的前卫配置中。

-renamesourcefileattribute SourceFile    
-keepattributes SourceFile,LineNumberTable

现在,您的堆栈轨迹将包括线号,并使用带有Proguard的回程工具(包括在Android SDK中),您可以像正常情况一样调试。

请注意,即使您不使用这两个配置选项,但ReTrace仍然可以输出有用的信息,只要您拥有映射文件,尽管并非完全明确。

注意:带有映射的文件由Proguard配置选项产生:

-printmapping outputfile.txt

在带有Android SDK的ANT文件中,它设置为映射.txt。

祝你好运。

Add the following lines to your proguard configuration.

-renamesourcefileattribute SourceFile    
-keepattributes SourceFile,LineNumberTable

Now your stack traces will include line numbers, and by using the retrace tool that ships with proguard (included in the Android SDK), you are able to debug like normal.

Note that even if you didn't use these two configuration options, retrace still can output useful information provided you have the mappings file, albeit not totally unambiguously.

Note: the file with the mappings is produced by the proguard configuration option:

-printmapping outputfile.txt

In the ant file shipped with the Android SDK, it is set to mapping.txt.

Good luck.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文