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

Qt 5.15.2 Qt Creator 4.15.1 Cannot build any android static library with windows as host

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.15.2, 5.15.5
    • Fix Version/s: None
    • Component/s: Build tools: qmake
    • Environment:
      Windows 10 as host. cross compiling for android
    • Platform/s:
      Android

      Description

      Qt 5.15.2 Qt Creator 4.15.1 Cannot build any android static library with windows as host
      Steps To Recreate
      1.) Create Directory D:\StaticLibTest
      2.) Open Qt Creator and select File->New File Or Project
      3.) Select Librarary and C++ then click Choose
      4.) Name: StaticLibTest Create In: D:\StaticLibTest then click Next
      5.) Build system: qmake then click Next
      6.) Change Shared Library to Static Linked Library then click Next
      7.) Click Next (no translations)
      8.) check Android Qt 5.15.2 Clang Multi-Abi then click Next and Finish
      9.) Build->Run qmake
      10.) Build->Rebuild StaticLibTest

      result error
      Cannot create F:/StaticLibTest/build-StaticLibTest-Android_Qt_5_15_2_Clang_Multi_Abi-Debug/android-build/Qt/5.15.2/android/plugins/generic/libStaticLibTest.a for output

      I changed target.path = $$[QT_INSTALL_PLUGINS]/generic
      to
      target.path = D:\StaticLibTest

      result error
      D:\StaticLibTest\build-StaticLibTest-Android_Qt_5_15_2_Clang_Multi_Abi-Debug\android-build\StaticLibTest\libStaticLibTest.a:-1: error: Cannot create D:/StaticLibTest/build-StaticLibTest-Android_Qt_5_15_2_Clang_Multi_Abi-Debug/android-build/StaticLibTest/libStaticLibTest.a for output

      I commented out the # Default rules for deployment. completely
      result error
      Cannot set up Android, not building an APK.
      Error while building/deploying project StaticLibTest (kit: Android Qt 5.15.2 Clang Multi-Abi)
      When executing step "Build Android APK"

      I have a large project in which static libs are created then linked later
      This works in windows and linux and with the old 5.12 build system but not with the latest 5.15
      Is there any way to suppress the Cannot set up Android, not building an APK. error ?
      Everything compiles fine I just need qt to not error after creating the static library

        Attachments

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

          Activity

            People

            Assignee:
            qtbuildsystem Qt Build System Team
            Reporter:
            nolimitconnect-developer Brett Joned
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes