How to set icon for Qt Android app in CMake?
-
wrote on 28 Oct 2022, 17:07 last edited by
I have gone through the steps mentioned in that link. Could not get the expected result. Please guide me ...
-
What exactly did you do ?
-
wrote on 28 Oct 2022, 20:17 last edited by Akshai
@SGaist Please see steps below.
- Created Qt android project in CMake and build in release mode.
- Created a folder named "android" in project folder (Where CMakeLists.txt file exist)
- Copied "AndroidManifest.xml" from "android-build" folder and paste it to "android" folder which already created in step 2.
- Open Projects option Qt , and under "Build Android APK" option selected "Create Templates" and edited "AndroidManifest.xml" (Added icon)
- Build again and deployed. The icon not updated.!
Please see my edited "AndroidManifest.xml" file below.
Capture.PNG -
Check the xml file in the build folder to see if it has changed. If not, delete the build folder and start anew.
-
Check the xml file in the build folder to see if it has changed. If not, delete the build folder and start anew.
wrote on 29 Oct 2022, 21:20 last edited by@SGaist I checked "AndroidManifest.xml" file in the build folder, it is not changed. "AndroidManifest.xml" file in the build folder will update everytime when we building. So if i modified the file, it will not reflect in the build apk.
-
It's not that one that you have to change. It's the one you copied into your sources. It should then be used when building your application.
-
It's not that one that you have to change. It's the one you copied into your sources. It should then be used when building your application.
-
Did you already do what is described here ?
-
Which version of Qt are you using ?
-
That's Qt Creator. I am asking which version you use to build your application.
-
So you put your Androïd related changes in the else clause that concerns Qt 5.
-
Move your changes to the Qt 6 part of the if.
-
Remember to do a full rebuild (clean, run cmake, rebuild) when you change cmake code.
-
@Akshai also, delete the app from your device, let it install fresh
12/27