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

REG [6.5.0->6.5.1] corelib/platform/androidnotifier not compiling on Android

    XMLWordPrintable

Details

    • Android
    • c27d5eca6 (dev), 93d10d72c (6.5), 095342b16 (tqtc/lts-6.2)
    • 2023wk16FOQtforAndroid

    Description

      Install Qt 6.5.1 Android snapshot on Windows, configure example corelib/platform/androidnotifier

      C:\Users\qt\RTA\Qt_6.5.1\6.5.1\android_x86_64\bin\qt-cmake -S C:\Users\qt\RTA\Qt_6.5.1\Examples\Qt-6.5.1\corelib\platform\androidnotifier -B C:\Users\qt\RTA\Qt_6.5.1\Examples\Qt-6.5.1\corelib\platform\androidnotifier\bld_x86_64 -DANDROID_SDK_ROOT=%ANDROID_SDK_ROOT% -DANDROID_NDK_ROOT=%ANDROID_NDK_ROOT_DEFAULT% -GNinja 

      Finishes fine, build:

      cmake --build . --target apk in C:\Users\qt\RTA\Qt_6.5.1\Examples\Qt-6.5.1\corelib\platform\androidnotifier\bld_x86_64 

      Fails:

      [1/9] Automatic MOC and UIC for target androidnotifier
      [2/9] Running rcc for resource main
      [3/9] Building CXX object CMakeFiles/androidnotifier.dir/bld_x86_64/.rcc/qrc_main.cpp.o
      [4/9] Building CXX object CMakeFiles/androidnotifier.dir/androidnotifier_autogen/mocs_compilation.cpp.o
      [5/9] Building CXX object CMakeFiles/androidnotifier.dir/notificationclient.cpp.o
      [6/9] Building CXX object CMakeFiles/androidnotifier.dir/main.cpp.o
      [7/9] Linking CXX shared module libandroidnotifier_x86_64.so
      [8/9] Copying androidnotifier binary to apk folder
      [9/9] Creating APK for androidnotifier
      WARNING 15:07:53
      FAILED: CMakeFiles/androidnotifier_make_apk C:/Users/qt/RTA/Qt_6.5.1/Examples/Qt-6.5.1/corelib/platform/androidnotifier/bld_x86_64/CMakeFiles/androidnotifier_make_apk 
      cmd.exe /C "cd /D C:\Users\qt\RTA\Qt_6.5.1\Examples\Qt-6.5.1\corelib\platform\androidnotifier\bld_x86_64 && C:\Users\qt\RTA\Qt_6.5.1\6.5.1\mingw_64\bin\androiddeployqt --input C:/Users/qt/RTA/Qt_6.5.1/Examples/Qt-6.5.1/corelib/platform/androidnotifier/bld_x86_64/android-androidnotifier-deployment-settings.json --output C:/Users/qt/RTA/Qt_6.5.1/Examples/Qt-6.5.1/corelib/platform/androidnotifier/bld_x86_64/android-build --apk C:/Users/qt/RTA/Qt_6.5.1/Examples/Qt-6.5.1/corelib/platform/androidnotifier/bld_x86_64/android-build/androidnotifier.apk"
      Generating Android Package
        Input file: C:/Users/qt/RTA/Qt_6.5.1/Examples/Qt-6.5.1/corelib/platform/androidnotifier/bld_x86_64/android-androidnotifier-deployment-settings.json
        Output directory: C:/Users/qt/RTA/Qt_6.5.1/Examples/Qt-6.5.1/corelib/platform/androidnotifier/bld_x86_64/android-build/
        Application binary: androidnotifier
        Android build platform: android-33
        Install to device: No
      Skipping createRCC
      To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/8.0/userguide/gradle_daemon.html#sec:disabling_the_daemon.
      Daemon will be stopped at the end of the build 
      > Task :preBuild UP-TO-DATE
      > Task :preDebugBuild UP-TO-DATE
      > Task :mergeDebugNativeDebugMetadata NO-SOURCE
      > Task :compileDebugAidl NO-SOURCE
      > Task :compileDebugRenderscript
      The RenderScript APIs are deprecated. They will be removed in Android Gradle plugin 9.0. See the following link for a guide to migrate from RenderScript: https://developer.android.com/guide/topics/renderscript/migrate
      > Task :generateDebugBuildConfig
      > Task :javaPreCompileDebug
      > Task :checkDebugAarMetadata
      > Task :generateDebugResValues
      > Task :mapDebugSourceSetPaths
      > Task :generateDebugResources
      > Task :createDebugCompatibleScreenManifests
      > Task :extractDeepLinksDebug
      > Task :processDebugMainManifest FAILED
      package="org.qtproject.example.androidnotifier" found in source AndroidManifest.xml: C:\Users\qt\RTA\Qt_6.5.1\Examples\Qt-6.5.1\corelib\platform\androidnotifier\bld_x86_64\android-build\AndroidManifest.xml.
      Setting the namespace via a source AndroidManifest.xml's package attribute is deprecated.
      Please instead set the namespace (or testNamespace) in the module's build.gradle file, as described here: https://developer.android.com/studio/build/configure-app-module#set-namespace
      This migration can be done automatically using the AGP Upgrade Assistant, please refer to https://developer.android.com/studio/build/agp-upgrade-assistant for more information.
      C:\Users\qt\RTA\Qt_6.5.1\Examples\Qt-6.5.1\corelib\platform\androidnotifier\bld_x86_64\android-build\AndroidManifest.xml:29:9-51:20 Error:
          android:exported needs to be explicitly specified for element <activity#org.qtproject.qt.android.bindings.QtActivity>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
      See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
      > Task :mergeDebugResources
      FAILURE: Build failed with an exception.
      * What went wrong:
      Execution failed for task ':processDebugMainManifest'.
      > Manifest merger failed : android:exported needs to be explicitly specified for element <activity#org.qtproject.qt.android.bindings.QtActivity>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
      * Try:
      > Run with --stacktrace option to get the stack trace.
      > Run with --info or --debug option to get more log output.
      > Run with --scan to get full insights.
      * Get more help at https://help.gradle.org
      BUILD FAILED in 14s
      10 actionable tasks: 10 executed 

      Example was compiled with same commands with 6.5.0.

      Reproduces with all four Android architectures on all supported hosts (linux, macOS, win)

      Attachments

        Issue Links

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

          Activity

            People

              bartlomiejmoskal Bartlomiej Moskal
              joaijala Johanna Äijälä
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There is 1 open Gerrit change