Nominate our 2022 Qt Champions!

Android App icons. How?

  • Hello all!
    Trying to add application icons into Qt project. Been following this topic. It's appeared in manifest files:

    <?xml version="1.0"?>
    <manifest package="org.qtproject.example" xmlns:android="" android:versionName="1.0" android:versionCode="1" android:installLocation="auto">
    <application android:hardwareAccelerated="true" android:name="" android:label="-- %%INSERT_APP_NAME%% --" android:icon="@drawable/icon">

    But it's not appearing when I am deploying it into device. What am I missing?
    Possible some code in *.pro file?

  • The cause of it found. The sequence of actions should be:

    • follow instructions that is published in topic
    • add icons to your project in "res" directory (I am using [project_root]/platforms/android and inside of it all that should be deployed to Android device)
    • add this directory like "ANDROID_PACKAGE_SOURCE_DIR" in *pro file
    # ----------------------------------------
    # Android Configuration
    android {
    DISTFILES += \
    platforms/android/AndroidManifest.xml \
    platforms/android/build.gradle \
    platforms/android/gradle/wrapper/gradle-wrapper.jar \
    platforms/android/gradle/wrapper/ \
    platforms/android/gradlew \
    platforms/android/gradlew.bat \
    ANDROID_PACKAGE_SOURCE_DIR = $$PWD/platforms/android

Log in to reply