Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-27088

Wrong Android service meta-data in AndroidManifest.xml for Qt 6.2 projects

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • Qt Creator 7.0.0-rc1
    • Qt Creator 6.0.2, Qt Creator 7.0.0-beta1
    • Android Support
    • None
    • QtCreator 6.0.2/7.0.0-beta1, Qt 6.2.3 for Android
    • Android
    • 0f6e9f7146 (qt-creator/qt-creator/7.0) 0f6e9f7146 (qt-creator/tqtc-qt-creator/7.0) 0f6e9f7146 (qt-creator/qt-creator/master) 0f6e9f7146 (qt-creator/tqtc-qt-creator/master) 0f6e9f7146 (qt-creator/qt-creator/qds-3.3)

    Description

      When adding Android service something like following stuff being keep added to AndroidManifest.xml:

              <service android:name=".MainService" android:process=":Service">
                  <meta-data android:name="android.app.qt_sources_resource_id" android:resource="@array/qt_sources"/>
                  <meta-data android:name="android.app.repository" android:value="default"/>
                  <meta-data android:name="android.app.qt_libs_resource_id" android:resource="@array/qt_libs"/>
                  <meta-data android:name="android.app.bundled_libs_resource_id" android:resource="@array/bundled_libs"/>
                  <meta-data android:name="android.app.bundle_local_qt_libs" android:value="-- %%BUNDLE_LOCAL_QT_LIBS%% --"/>
                  <meta-data android:name="android.app.use_local_qt_libs" android:value="-- %%USE_LOCAL_QT_LIBS%% --"/>
                  <meta-data android:name="android.app.libs_prefix" android:value="/data/local/tmp/qt/"/>
                  <meta-data android:name="android.app.load_local_libs_resource_id" android:resource="@array/load_local_libs"/>
                  <meta-data android:name="android.app.load_local_jars" android:value="-- %%INSERT_LOCAL_JARS%% --"/>
                  <meta-data android:name="android.app.static_init_classes" android:value="-- %%INSERT_INIT_CLASSES%% --"/>
                  <meta-data android:name="android.app.background_running" android:value="true"/>
                  <meta-data android:name="android.app.lib_name" android:value="service"/>
              </service>
      

      those was ok for Qt 5.15 projects, but result in build error for Qt 6.2 projects (probably because most of those meta-data elements related to removed in Qt 6.2 Ministro):

      FAILURE: Build failed with an exception.* What went wrong:
      Execution failed for task ':processDebugResources'.
      > A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
         > Android resource linking failed
           ERROR:C:\workspace\build-testsub-Android_Qt_6_2_3_Clang_arm64_v8a-Debug\android-build\build\intermediates\packaged_manifests\debug\AndroidManifest.xml:52: AAPT: error: resource array/qt_sources (aka org.qtproject.example:array/qt_sources) not found.

       

      If i remove these attributes QtCreator keeps adding them automatically every time manifest editor opened.

      Attachments

        Issue Links

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

          Activity

            People

              assam Assam Boudjelthia
              morte Maxim Bescherevnykh
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes