Qt6第二个LTS出来了,周日找时间安装并测试了Qt6.5LTS,安装我是按我之前的一个博客记录来做的,用的是国内境像,顺利快速安装完成,下面是设置的过程关键总结。
一、Devices
Android设备(Device)选择
二、Kits
(一)新机(64位系统)选arm64-v8a,性能优,不要选v7a,性能会低。
“专门针对下“SDK Manager"注解下
(二)Android Qt 工具链设置
三、xxx.cmake
(1)如果提示下面错误(cmake过程出现)文章来源:https://www.toymoban.com/news/detail-471069.html
问题: C:\Qt6_5LTS\6.5.1\android_arm64_v8a\lib\cmake\Qt6BuildInternals\QtBuildInternalsExtra.cmake:45: error: Syntax error in cmake code at C:/Qt6_5LTS/6.5.1/android_arm64_v8a/lib/cmake/Qt6BuildInternals/QtBuildInternalsExtra.cmake:45 when parsing string C:\Qt6_5LTS Invalid character escape '\Q'. C:/Qt6_5LTS/6.5.1/android_arm64_v8a/lib/cmake/Qt6BuildInternals/Qt6BuildInternalsConfig.cmake:54 (include) C:/Qt6_5LTS/6.5.1/android_arm64_v8a/lib/cmake/Qt6/Qt6Config.cmake:157 (find_package) CMakeLists.txt:14 (find_package)
思考:
根据提示进入“QtBuildInternalsExtra.cmake”,观察“:\Qt6_5LTS”,对比同一文件中的路径,怀疑是“转义符问题造成”。下面蓝色字体为实际xxx.cmake文件的摘录
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND
NOT QT_BUILD_INTERNALS_NO_FORCE_SET_INSTALL_PREFIX
AND NOT QT_SUPERBUILD)
set(qtbi_orig_prefix "C:\Qt6_5LTS")
set(qtbi_orig_staging_prefix "C:/Qt6_5LTS/6.5.1/android_arm64_v8a")
尝试(qPass):
把"\",改为“/”,问题解决;也即:set(qtbi_orig_prefix "C:/Qt6_5LTS")文章来源地址https://www.toymoban.com/news/detail-471069.html
到了这里,关于Qt6.5.1LTS搭建Android开发环境填坑的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!