Kotlin代码堆栈跟踪显示Java行号 [英] Kotlin code stack trace shows Java line numbers

查看:236
本文介绍了Kotlin代码堆栈跟踪显示Java行号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Google Play商店中为我的应用调试几次崩溃,但是Play商店中显示的堆栈跟踪显示Java文件名和行号,而不是直接引用我的Kotlin代码.我在Android Studio中查看了Java代码,但是行号不匹配.

I'm trying to debug a couple of crashes for my app in the Google Play Store, but the stack traces showing in the Play Store show Java filenames and line numbers instead of direct references to my Kotlin code. I viewed the Java code in Android Studio, but the line numbers do not match.

要查看Java代码,我转换为字节码,然后反编译为Java. Android Studio中还有一个更直接的选项将Kotlin反编译为Java",但是此功能已被禁用;我希望这可以使我与堆栈跟踪更好地匹配.

To view the Java code, I converted to byte code and then decompiled to Java. There's also a more direct option in Android Studio to 'Decompile Kotlin to Java', but this is disabled; my hope was that this would give me a better match against the stack traces.

如何使用在Play商店的崩溃报告中看到的堆栈跟踪信息来识别Kotlin源代码中的问题?

How can I use the stack trace info I see in crash reports in the Play Store to identify the problems in my Kotlin source code?

推荐答案

复制堆栈跟踪,打开Android Studio或IntelliJ IDEA,单击分析->分析堆栈跟踪,将其粘贴并单击确定. 带有行的类名将变为可单击的,并且单击应正确工作.

Copy your stack trace, open Android Studio or IntelliJ IDEA, click Analyze -> Analyze Stack Trace, paste it and click Ok. Class names with lines will become clickable and clicks should work correctly.

这篇关于Kotlin代码堆栈跟踪显示Java行号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆