Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Android App icons. How?
Qt 6.11 is out! See what's new in the release blog

Android App icons. How?

Scheduled Pinned Locked Moved Solved Mobile and Embedded
2 Posts 1 Posters 1.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bogong
    wrote on last edited by
    #1

    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="http://schemas.android.com/apk/res/android" android:versionName="1.0" android:versionCode="1" android:installLocation="auto">
    <application android:hardwareAccelerated="true" android:name="org.qtproject.qt5.android.bindings.QtApplication" 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?

    1 Reply Last reply
    0
    • B Offline
      B Offline
      bogong
      wrote on last edited by bogong
      #2

      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/gradle-wrapper.properties \
      platforms/android/gradlew \
      platforms/android/gradlew.bat \
      platforms/android/res/values/libs.xml 
      
      ANDROID_PACKAGE_SOURCE_DIR = $$PWD/platforms/android
      
      }
      
      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved