Android Studio Debugger 进程已完成,退出代码为 127

And*_*aul 10 debugging android adb android-studio

最近升级到 Android Studio 4.2.1

我可以成功启动我的应用程序,但是当我尝试附加调试器时,问题标题中出现错误(请参见下面的屏幕截图)。

该应用程序只是停留在“等待调试器”屏幕上。

升级前一切正常。

这是调试日志的输出

$ adb shell am start -n "com.*.*/com.*.*.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D
Waiting for application to come online: com.*.* | com.*.*.test
Waiting for application to come online: com.*.* | com.*.*.test
Connected to process 9869 on device 'amazon-kfmuwi-G0W0X8089256FRU1'.
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
W/ActivityThread: Application com.*.* is waiting for the debugger on port 8100...
I/System.out: Sending WAIT chunk
Connecting to com.*.*
Now Launching Native Debug Session
com.intellij.execution.ExecutionFinishedException: Execution finished

Process finished with exit code 0
Run Code Online (Sandbox Code Playgroud)

在 logcat 我也看到

2021-05-19 12:55:32.855 10394-10394/? E/azon.kindle.cm: Not starting debugger since process cannot load the jdwp agent.

我尝试过:重新启动Android设备重新启动开发设备使Android Studio无效并重新启动重新安装Android Studio

我的系统正在运行 Pop!_OS 20.10

调试错误

Max*_*kin 22

我已经通过安装“libncurses5”和“ia32-libs”包解决了这个问题

这是一个已知问题,在 android 开发人员的官方页面上提供。这是链接https://developer.android.com/studio/known-issues?hl=de#native_debugger_crashes_with_debugger_process_finished_with_exit_code_127

事实证明这是一个特定于 Linux 的问题,因为 Linux 使用升级的“libncurses6”,而 android studio 使用运行调试器所需的“libncurses5”。

  • 太好了,这也为我解决了这个问题:`sudo apt install libncurses5` (12认同)
  • 是的。安装 `libncurses5` 也为我解决了这个问题 (5认同)
  • 在这种情况下,Arch linux 的软件包是“ncurses5-compat-libs” (2认同)

小智 7

我通过仅安装“libncurses5”解决了这个问题

sudo apt install libncurses5
Run Code Online (Sandbox Code Playgroud)

感谢马克斯·埃尔金