Uploaded image for project: 'Qt Tools for Android'
  1. Qt Tools for Android
  2. QTTA-350

Getting error while trying to set the ABI via CMake flag

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • QtGP 1.2
    • QtGP: General
    • None
    • macOS

    Description

      Env:

      MacOS 15.4
      Qt GP 1.2
      Qt 6.9.0

      Config:

      QtBuild {
          qtPath = file("/Users/lukaszkosiorowski/Qt/6.9.0")
          projectPath = file("/Users/lukaszkosiorowski/Downloads/test/qtquickview2")
          extraCMakeArguments = ['-DANDROID_ABI=arm64-v8a']
      } 

       

      Steps:

      1. Open Android project with Qt project. 
      2. Set the arm64_v8a ABI via setExtraCMakeArguments (see the snippet below)
      3. Try to run the app. **

      Expected: The task is run for the specified ABI. 

      Actual: The GP uses the added flag, but does not ignore the default ones, so there are 3 conflicting flags (-DANDROID_ABI=x86, -DQT_ANDROID_BUILD_ALL_ABIS=ON, -DANDROID_ABI=arm64-v8a) in the command run. However, it's not pointed in the error.  **  I've got this error message:

      CMake Error at CMakeLists.txt:9 (find_package):
      -- Configuring incomplete, errors occurred!
      Could not find a configuration file for package "Qt6" that is compatible
      with requested version "6.8".The following configuration files were considered but not accepted:/Users/lukaszkosiorowski/Qt/6.9.0/android_x86/lib/cmake/Qt6/Qt6Config.cmake, version: 6.9.0 (32bit)
      Execution failed for task ':app:QtBuildTask'.
      > the command '/Users/lukaszkosiorowski/Qt/6.9.0/android_x86/bin/qt-cmake' returned error code 1.
        > Command arguments: [-S, /Users/lukaszkosiorowski/Downloads/test/qtquickview2, -B, /Users/lukaszkosiorowski/Qt/Examples/Qt-6.9.0/platforms/android/qtquickview_java/app/build/qt_generated/qtquickview2, -G, Ninja, -DQT_ANDROID_GENERATE_JAVA_QTQUICKVIEW_CONTENTS=ON, -DQT_USE_TARGET_ANDROID_BUILD_DIR=ON, -DANDROID_ABI=x86, -DQT_ANDROID_BUILD_ALL_ABIS=ON, -DCMAKE_MAKE_PROGRAM=/usr/local/bin/ninja, -DANDROID_SDK_ROOT=/Users/lukaszkosiorowski/Library/Android/sdk, -DANDROID_NDK_ROOT=/Users/lukaszkosiorowski/Library/Android/sdk/ndk/26.1.10909125, -DANDROID_ABI=arm64-v8a]
      

       

      Attachments

        Issue Links

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

          Activity

            People

              teko Tero Koponen
              lkos Łukasz Kosiorowski
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes