QGroundControl Qt安卓环境搭建及编译出现的问题

记录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

最近更新

  1. TCP协议是安全的吗?

    2024-01-17 09:00:03       14 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-01-17 09:00:03       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-01-17 09:00:03       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-01-17 09:00:03       18 阅读

热门阅读

  1. LeetCode第198题 - 打家劫舍

    2024-01-17 09:00:03       34 阅读
  2. 设计模式——策略模式

    2024-01-17 09:00:03       27 阅读
  3. 微信小程序支付之V2支付

    2024-01-17 09:00:03       23 阅读
  4. Django消息框架

    2024-01-17 09:00:03       34 阅读
  5. Wargames与bash知识19

    2024-01-17 09:00:03       25 阅读
  6. 【Python 千题 —— 基础篇】猜数字小游戏

    2024-01-17 09:00:03       29 阅读