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

查看:43
本文介绍了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天全站免登陆