Qt Creator 无法确定调试器类型 – Android 调试器

huangapple go评论96阅读模式
英文:

Qt Creator could not determine debugger type - Android Debugger

问题

尝试配置Qt Creator 4.11.0以在将应用部署到Android设备后进行调试。我可以成功构建应用程序,但无法进行调试,因为Qt Creator似乎无法确定自动检测到的Android Clang调试器的调试器类型。

Qt Creator 无法确定调试器类型 – Android 调试器

我尝试切换到Qt Creator的较新版本(9.0.2)并重新安装整个Qt,但无济于事。可能的原因是什么?

英文:

I am trying to configure Qt Creator 4.11.0 to debug an Android application. after deploying it to an android device. I can successfully build the application, but I cannot debug it, as Qt Creator apparently cannot determine the debugger type of the auto-detected Android Debugger for Android Clang.

Qt Creator 无法确定调试器类型 – Android 调试器

I tried to switch to a newer version of Qt creator (9.0.2) and re-install Qt as a whole, to no avail.
What could be the cause of this?

答案1

得分: 1

我看到它在主目录,所以你不应该有任何权限问题,但在检查/尝试之前,你永远不知道。

你是否尝试在终端中手动运行gdb?(权限问题)

你是否尝试过gdb的另一个版本(不是20),甚至尝试了另一个QT Creator版本吗?

或者你可能需要像这里一样安装必要的设备:
https://developernote.com/2021/12/configuring-android-ndk-version-in-qt-creator/
(还要向下滚动,那里有一个替换一些JSON内容的解决方案)。

干杯

英文:

Did you try to run the gdb manually in a terminal? (Permission rights)
I see it's in home, so you shouldn't have any permission issues, but you never know until you check/try.

Did you tried another version of gdb (not 20) or even another QT-Creator version?

Or maybe you need to install necessary devices yet like here:
https://developernote.com/2021/12/configuring-android-ndk-version-in-qt-creator/
(Scroll also down, there is a solution, with replacing some json-content).

Cheers

答案2

得分: 1

我最终解决了这个问题,方法是升级到 Qt Creator 9.0.2 并重新安装 NDK(尝试了多个不同版本)。这引起了一个新的问题,之前莫名其妙没有出现:NDK 中的 gdb 版本无法运行,因为我没有安装 libncurses5。安装了它后,调试器终于被识别了。
所以,简而言之,修复方法是

apt install libncurses5
英文:

I ended up solving this by upgrading to Qt Creator 9.0.2 and reinstalling the NDK (multiple different versions). This highlighted a new problem, which somehow did not show before: the gdb version inside the NDK could not run because I did not have libncurses5 installed. After installing it, the debugger was finally recognized.
So, in short, the fix was

apt install libncurses5

huangapple
  • 本文由 发表于 2023年3月7日 16:43:21
  • 转载请务必保留本文链接:https://go.coder-hub.com/75659675.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定