【发布时间】:2021-05-14 20:04:06
【问题描述】:
如果我通过 JNI 使用 C 代码,Android Studio 将无法启动调试器。 运行它正常运行良好,但调试器甚至没有启动,无论我是在调试 Kotlin 还是 C 代码。
它会抛出一条消息Debugger process finished with exit code 127. Rerun 'app'
它给我的唯一细节是com.intellij.execution.ExecutionFinishedException: Execution finished。
在这里我设置了一个简单的 github 存储库来复制错误:https://github.com/perojas3/Android-JNI-debug-bug-example。它只是调用 C 代码来获取一个字符串,然后将其显示在 toast 中。
在这里,我设置了一个小的 youtube 视频,以显示错误发生的方式:https://youtu.be/8jIL5yqP7m8
我现在正在使用 Manjaro Linux。
【问题讨论】:
-
我遇到了同样的问题。我认为它发生在升级到 Android Studio 4.2 之后。你有什么版本?
-
我使用的是 android-studio 4.2.1.0-1。我会尝试降级,
标签: android c android-studio debugging java-native-interface