简体   繁体   English

在不使用 qmake 的情况下在适用于 Android 的 Qt 应用程序上使用自定义 AndroidManifest?

[英]Using a custom AndroidManifest on a Qt app for Android without using qmake?

I'm using Qt Creator on openSUSE Tumbleweed我在 openSUSE Tumbleweed 上使用 Qt Creator

I have been trying to change my Qt app's icon and name.我一直在尝试更改我的 Qt 应用程序的图标和名称。 "Projects > Android > Create Templates" works only for qmake projects. “项目 > Android > 创建模板”仅适用于 qmake 项目。 I'm using CMake with some (not Qt related) CMake Modules, so I cant use qmake.我将 CMake 与一些(与 Qt 无关的)CMake 模块一起使用,所以我不能使用 qmake。

I tried using qt-android-cmake , but fails with error No target architecture defined in json file , and even after fixing the json file, doesn't output an APK file.我尝试使用qt-android-cmake ,但失败并出现错误No target architecture defined in json file ,即使在修复 json 文件后,也不会输出 APK 文件。

Also tried setting DISTFILES on CMake but also didn't work.还尝试在 CMake 上设置DISTFILES但也没有用。

Is this even possible to do without qmake?这甚至可以在没有 qmake 的情况下完成吗?

If you're using Qt 5.14, Qt 5.15 or higher, then the " No target architecture defined in json file " error with qt-android-cmake is due to a bug: qt-android-cmake issue #35 .如果您使用的是 Qt 5.14、Qt 5.15 或更高版本,那么qt-android-cmakeNo target architecture defined in json file ”错误是由于错误造成的: qt-android-cmake 问题 #35

A fix was merged on 2020-06-02 .修复已于2020-06-02 合并 So, update your qt-android-cmake and try again.因此,请更新您的qt-android-cmake试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM