Setting an icon for the QML app (the APK file)
-
Hi all,
I'm about to set an application icon/image for the APK file of a QML project called QML_4. For that I go to Projects -> Build Android APK on Qt Creator and click on Create Templates there and check the "Copy..." checkbox. This message comes up!
What's the problem and how to properly set an icon/image for the APK file to be shown when it's installed on an Android device, please? -
@qcoderpro what version of QtCreator are you using?
how to properly set an icon/image for the APK file to be shown when it's installed on an Android device
via the android manifest, newer versions of QtCreator actually allow you to upload one master icon and will do the size conversions for you, very convenient :
-
@J-Hilk
My Qt Creator version is 7.0.0 (based on Qt 6.2.3). When I click on the OK button on the screenshot in the previous post, it takes me to the following page and I set an image for that app:
But when I install the built file (the APK file) on the Android device the image is not shown and the app looks like basic Android Apps! :| -
@qcoderpro clean your build directory, and completely remove any old installation on your device, don't rely on the overwrite methods of the "deployment"
also maybe restart your phone (after deleting the old installations) I can't remember if it was android or iOS that cached the app icons and required a device reboot to show the new icons
-
I removed the android folder created by the manifest process on the project's directory and also the folder for Android Release mode. Then uninstalled the app on the Android device (Genymotion virtual Android device). After these all, clicked on Build. The apk file was created although I got an empty (!) error on the Qt Creator! Of course, still no icon is displayed! :(
-
@qcoderpro mmh, thats unfortunate. When you open/extract the generated apk file, do you see a
res
folder containing bunch of 'drawable-xxxx' each containing your selected icon ?The errors are concerning, I'm personally not using QtCreator 7 (5.0.3 the only one thats "stable" for me using the clang code model), and can't help here further
-
@qcoderpro said in Setting an icon for the QML app (the APK file):
Did you find the first error I sent in the first post here trivial? Probably that may cause later issues.
like I said, I'm not using Qt7 there might be a bug with that, but I usually also do not check that checkbox, top copy the files.
Was never really necessary :D