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

qmake for Android does not generate properly the Makefile for release build

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2: Important P2: Important
    • None
    • 5.15, 6.x
    • Build tools: qmake
    • None
    • Android
    • 2025wk34s2QtforAndroid

      In Android, when you run qmake with release config, the generated Makefile does not pass the --release switch to androiddeployqt tool.

      ~/Qt/5.15.1/android/bin/qmake CONFIG+=release ANDROID_ABI=x86 ../Socketeer
      

      the above results in building your code as release (-O2, no debug stuff), but when creating the APK itself you get the following:

      Skipping createRCC
      > Task :preBuild UP-TO-DATE
      > Task :preDebugBuild UP-TO-DATE
      > Task :compileDebugAidl
      > Task :compileDebugRenderscript NO-SOURCE
      > Task :generateDebugBuildConfig
      > Task :mainApkListPersistenceDebug
      > Task :generateDebugResValues
      > Task :generateDebugResources
      > Task :createDebugCompatibleScreenManifests
      > Task :extractDeepLinksDebug
      > Task :processDebugManifest
      > Task :mergeDebugShaders
      > Task :compileDebugShaders
      > Task :generateDebugAssets
      > Task :mergeDebugAssets
      > Task :processDebugJavaRes NO-SOURCE
      > Task :checkDebugDuplicateClasses
      > Task :javaPreCompileDebug
      > Task :mergeDebugJniLibFolders
      > Task :mergeExtDexDebug
      > Task :validateSigningDebug
      > Task :mergeDebugJavaResource
      > Task :mergeDebugResources
      > Task :processDebugResources
      
      > Task :compileDebugJavaWithJavac
      
      > Task :compileDebugSources
      > Task :dexBuilderDebug
      > Task :mergeLibDexDebug
      > Task :mergeDebugNativeLibs
      > Task :stripDebugDebugSymbols
      > Task :mergeProjectDexDebug
      > Task :packageDebug
      > Task :assembleDebug
      
      BUILD SUCCESSFUL in 9s
      25 actionable tasks: 25 executed
      Note: Some input files use or override a deprecated API.
      Note: Recompile with -Xlint:deprecation for details.
      Android package built successfully in 11.024 ms.
        -- File: /home/piotr/projects/build-Socketeer/android-build//build/outputs/apk/debug/android-build-debug.apk
      

      Note that the APK is built as a debug one.

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

            assam Assam Boudjelthia
            piotrmi Piotr Mikolajczyk
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes