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

wrong apk creation in project with SUBDIRS

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Not Evaluated
    • Resolution: Done
    • Qt Creator 6.0.0, Qt Creator 6.0.1, Qt Creator 6.0.2
    • Qt Creator 7.0.0
    • Android Support
    • None
    • Android

    Description

      when build a project with SUBDIRS install and deployment dirs are wrong.

      an example:

      here my .pro files

       AppTest.pro

      TEMPLATE = subdirs
      
      SUBDIRS += A
      SUBDIRS += B
      A.depends = B

       

       A.pro

      TEMPLATE = app
      
      QT += qml quick androidextras
      
      CONFIG += c++11
      
      TARGET = A
      
      SOURCES += src/main.cpp
      
      RESOURCES += $$PWD/qml.qrc
      
      DISTFILES += android/AndroidManifest.xml \
          android/AndroidManifest.xml \
          android/build.gradle \
          android/gradle.properties \
          android/gradle/wrapper/gradle-wrapper.jar \
          android/gradle/wrapper/gradle-wrapper.properties \
          android/gradlew \
          android/gradlew.bat \
          android/res/values/libs.xml
      
      ANDROID_MIN_SDK_VERSION = 23
      ANDROID_TARGET_SDK_VERSION = 30
      
      ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android
      

       

       B.pro

      TEMPLATE = lib
      TARGET = B
      CONFIG += dll
      QT += core
      QT += androidextras
      
      SOURCES += src/service_main.cpp
      
      

       

      when I build by QtCreator

      12:57:36: Initializing deployment to Android device/simulator
      12:57:36: Deploying to XXXXXXXXXXX
      12:57:36: Running steps for project AppTest...
      12:57:36: Starting: "/home/myhome/Qt/5.15.2/android/bin/qmake" /home/myhome/AppTest/AppTest.pro -spec android-clang CONFIG+=qtquickcompiler ANDROID_ABIS=armeabi-v7a
      Info: creating stash file /home/myhome/build-AppTest-Android_Qt_5_15_2_Clang_Multi_Abi-Release/.qmake.stash
      12:57:36: The process "/home/myhome/Qt/5.15.2/android/bin/qmake" exited normally.
      12:57:36: Starting: "/home/myhome/Android/Sdk/ndk/21.3.6528147/prebuilt/linux-x86_64/bin/make" -f /home/myhome/build-AppTest-Android_Qt_5_15_2_Clang_Multi_Abi-Release/Makefile qmake_all
      cd B/ && /home/myhome/Qt/5.15.2/android/bin/qmake -o Makefile /home/myhome/AppTest/B/B.pro -spec android-clang CONFIG+=qtquickcompiler ANDROID_ABIS=armeabi-v7a
      cd B/ && /home/myhome/Android/Sdk/ndk/21.3.6528147/prebuilt/linux-x86_64/bin/make -f Makefile qmake_all
      make[1]: Entering directory '/home/myhome/build-AppTest-Android_Qt_5_15_2_Clang_Multi_Abi-Release/B'
      make[1]: Nothing to be done for 'qmake_all'.
      make[1]: Leaving directory '/home/myhome/build-AppTest-Android_Qt_5_15_2_Clang_Multi_Abi-Release/B'
      cd A/ && /home/myhome/Qt/5.15.2/android/bin/qmake -o Makefile /home/myhome/AppTest/A/A.pro -spec android-clang CONFIG+=qtquickcompiler ANDROID_ABIS=armeabi-v7a
      cd A/ && /home/myhome/Android/Sdk/ndk/21.3.6528147/prebuilt/linux-x86_64/bin/make -f Makefile qmake_all
      make[1]: Entering directory '/home/myhome/build-AppTest-Android_Qt_5_15_2_Clang_Multi_Abi-Release/A'
      make[1]: Nothing to be done for 'qmake_all'.
      make[1]: Leaving directory '/home/myhome/build-AppTest-Android_Qt_5_15_2_Clang_Multi_Abi-Release/A'
      12:57:36: The process "/home/myhome/Android/Sdk/ndk/21.3.6528147/prebuilt/linux-x86_64/bin/make" exited normally.
      12:57:36: Starting: "/home/myhome/Android/Sdk/ndk/21.3.6528147/prebuilt/linux-x86_64/bin/make" -j4

      ...

      2:57:41: The process "/home/myhome/Android/Sdk/ndk/21.3.6528147/prebuilt/linux-x86_64/bin/make" exited normally.
      12:57:41: Starting: "/home/myhome/Android/Sdk/ndk/21.3.6528147/prebuilt/linux-x86_64/bin/make" INSTALL_ROOT=/home/myhome/build-AppTest-Android_Qt_5_15_2_Clang_Multi_Abi-Release/A/android-build install
      /home/myhome/Qt/5.15.2/android/bin/qmake -install qinstall -exe libA_armeabi-v7a.so /home/myhome/build-AppTest-Android_Qt_5_15_2_Clang_Multi_Abi-Release/A/android-build/libs/armeabi-v7a/libA_armeabi-v7a.so
      12:57:41: The process "/home/myhome/Android/Sdk/ndk/21.3.6528147/prebuilt/linux-x86_64/bin/make" exited normally.
      12:57:41: Starting: "/home/myhome/Qt/5.15.2/android/bin/androiddeployqt" --input /home/myhome/build-AppTest-Android_Qt_5_15_2_Clang_Multi_Abi-Release/A/android-A-deployment-settings.json --output /home/myhome/build-AppTest-Android_Qt_5_15_2_Clang_Multi_Abi-Release/A/android-build --android-platform android-30 --jdk /usr/lib/jvm/default-java --verbose --gradle

      this path are wrong in my opinion. In this way the libB_xxx.so created is never included into the apk file. libA_xxx.so only is copied.
      the path in these 2 parameters have to be /home/myhome/build-AppTest-Android_Qt_5_15_2_Clang_Multi_Abi-Release/android-build (for the example above)

       

      Attachments

        Issue Links

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

          Activity

            People

              portale Alessandro Portale
              qtbug-44371 Dario Faggin
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes