Androidデバイスでのデバッグ
LLDB を使用すると、Qt 5.15.9 以降および Qt 6.2 以降で開発した Android デバイス上のアプリケーションをデバッグできます。
Qt Creator の最近のリリースでは、Android上でLLDBを使用したネイティブ(C++)デバッグに問題がありました。
これは、Qt Creator 17.0.1 で修正されました。それ以前のリリースでこの問題を修正するには、Preferences >Debugger >GDB に移動し、Additional Attach Commands に以下を追加してください。
settings set plugin.jit-loader.gdb.enable off

デバイスでのデバッグを有効にする
Androidデバイスによって、デバッグを有効にする方法は異なります。「Developer Options 」の下にある「USB Debugging 」を探してください。「Settings 」>「About 」で「Build number 」を数回タップすると、「Developer Options 」が表示されます。
デバッグ用ビルド構成を選択する
Projects >Build Settings に移動し、Active build configuration でデバッグビルド構成を選択して、デバッグ用のアプリケーションをビルドします。
2つ目のデバッガーとの競合を解決する
Qt Creator Android Studio が実行されている場合、Android デバイス上でアプリケーションをデバッグすることはできません。「Application Output」に次のメッセージが表示された場合は、Android Studio を終了して、もう一度試してください:
Ignoring second debugger -accepting and dropping.
Androidエミュレータの使用
Linux、macOS、または Windows で Android デバイスをエミュレートするには、Android エミュレータを使用します。Android エミュレータは、Android 仮想デバイス (AVD) と呼ばれる仮想マシン上で Android オペレーティングシステムを実行します。
「Android 向け開発の手順」、「 Android 向け開発」、および「デバイス上の開発者向けオプションの設定」も参照してください 。
Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.