记录Qt 5.15.2搭建安卓环境出现的各种问题。
zipalign tool not found: D:/JavaAndroid/Android/sdk/build-tools//zipalign.exe?
答:需要将DANDROID_PLATFORM升级到已下载的版本.
bin/llvm-readobj.exe: error: unknown argument ‘–libs’
答:参考: https://developernote.com/2022/04/building-qt-6-3-0-for-android-on-windows-with-cpp20/
将sdk_definitions.json中的cmdline-tools修改为latest;ndk版本要对应上
qmlimportscanner: No such file or directory: “D:/workspace/build-qgroundcontrol-Qt_5_15_2_Clang_Multi_Abi-Debug/rcc/arm64-v8a/qmake_qmake_qm_files.qrc”
答:As a workaround, manually copying the qmake_qmake_qm_files.qrc file over from a rcc build works.
So it’s fixed in Qt 5.15.4 commercial LTS, or in the open source releases of Qt 6.
在rcc目录新建一个arm64-v8a目录,将rcc中的qmake_qmake_qm_files.qrc文件拷贝到arm64-v8a目录.
No implementation found for void org.mavlink.qgroundcontrol.QGCActivity.nativeInit()?
答:需要将Android目录下的AndroidManifest.xml删除,然后创建模板;
参考文章:https://forum.qt.io/topic/111150/programs-can-t-start-on-android-with-qt-5-14-x/2
new QGCMapEngine() undefined symbol ?
QMAKE_LINK += -nostdlib++ # Hack fix
对于5.15,需要将其删除
Qt中出现了Android SDK Command-line Tools run 错误,一般是版本不对,在android studio 中下载低版本的command-line tools 然后替换last目录下的文件。
参考: https://blog.csdn.net/yy_xzz/article/details/132135255