Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-138864

qt-android-runner.py doesn't find package name

XMLWordPrintable

    • Android
    • e21b5c140 (dev), ccfd1155b (6.10), c57362efe (6.9), fd03194de (tqtc/lts-6.8)
    • 2025wk32s2QtforAndroid

      In the Gradle-based build system, starting with AGP 7.3 the package tag in android manifest was deprecated and the usage of namespace attribute in build.gradle is expected. Using the generated script to run application on android device is failing with error:

      Error: Failed to retrieve the app's package name, received error: list index out of range
      Error: Failed to retrieve the package name of the app

      This error is coming from qt-android-runner.py as it tries to parse the package name from gradle file, but it's expecting different format. The parsing will fail also on build.gradle template file.

      Can be fixed by modifying line 106 in qt-android-runner.py to line.strip().split(' ')[1].strip("'")

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            assam Assam Boudjelthia
            withalion Matej Bagar
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: