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

[REG 6.5.0->6.5.1] nfc/annotatedurl not compiling on Android

    XMLWordPrintable

Details

    • Android
    • 83e139db3 (dev), a68f8d99f (6.5), 57e0f628b (tqtc/lts-6.2), ed2668354 (tqtc/lts-5.15)
    • 2023wk16FOQtforAndroid

    Description

      Install Qt 6.5.1 Android snapshot on Linux, configure example nfc/annotatedurl

      6.5.1/android_arm64_v8a/bin/qt-cmake -S /home/qt/RTA/Qt_6.5.1/Examples/Qt-6.5.1/nfc/annotatedurl -B /home/qt/RTA/Qt_6.5.1/Examples/Qt-6.5.1/nfc/annotatedurl/bld_arm64-v8a -DANDROID_SDK_ROOT=/opt/android/sdk -DANDROID_NDK_ROOT=/opt/android/android-ndk-r25b -GNinja 

      Finishes fine, build:

      cmake --build . --target apk in /home/qt/RTA/Qt_6.5.1/Examples/Qt-6.5.1/nfc/annotatedurl/bld_arm64-v8a 

      Fails:

      [1/8] Automatic MOC and UIC for target annotatedurl
      [2/8] Building CXX object CMakeFiles/annotatedurl.dir/mainwindow.cpp.o
      [3/8] Building CXX object CMakeFiles/annotatedurl.dir/annotatedurl_autogen/mocs_compilation.cpp.o
      [4/8] Building CXX object CMakeFiles/annotatedurl.dir/main.cpp.o
      [5/8] Building CXX object CMakeFiles/annotatedurl.dir/annotatedurl.cpp.o
      [6/8] Linking CXX shared module libannotatedurl_arm64-v8a.so
      [7/8] Copying annotatedurl binary to apk folder
      [8/8] Creating APK for annotatedurl
      FAILED: CMakeFiles/annotatedurl_make_apk /home/qt/RTA/Qt_6.5.1/Examples/Qt-6.5.1/nfc/annotatedurl/bld_arm64-v8a/CMakeFiles/annotatedurl_make_apk 
      cd /home/qt/RTA/Qt_6.5.1/Examples/Qt-6.5.1/nfc/annotatedurl/bld_arm64-v8a && /home/qt/RTA/Qt_6.5.1/6.5.1/gcc_64/bin/androiddeployqt --input /home/qt/RTA/Qt_6.5.1/Examples/Qt-6.5.1/nfc/annotatedurl/bld_arm64-v8a/android-annotatedurl-deployment-settings.json --output /home/qt/RTA/Qt_6.5.1/Examples/Qt-6.5.1/nfc/annotatedurl/bld_arm64-v8a/android-build --apk /home/qt/RTA/Qt_6.5.1/Examples/Qt-6.5.1/nfc/annotatedurl/bld_arm64-v8a/android-build/annotatedurl.apk
      Generating Android Package
        Input file: /home/qt/RTA/Qt_6.5.1/Examples/Qt-6.5.1/nfc/annotatedurl/bld_arm64-v8a/android-annotatedurl-deployment-settings.json
        Output directory: /home/qt/RTA/Qt_6.5.1/Examples/Qt-6.5.1/nfc/annotatedurl/bld_arm64-v8a/android-build/
        Application binary: annotatedurl
        Android build platform: android-33
        Install to device: No
      Skipping createRCC
      > Task :preBuild UP-TO-DATE
      > Task :preDebugBuild UP-TO-DATE
      > Task :mergeDebugNativeDebugMetadata NO-SOURCE
      > Task :compileDebugAidl NO-SOURCE
      > Task :compileDebugRenderscript NO-SOURCE
      > Task :generateDebugBuildConfig
      > Task :javaPreCompileDebug
      > Task :checkDebugAarMetadata
      > Task :generateDebugResValues
      > Task :mapDebugSourceSetPaths
      > Task :generateDebugResources
      > Task :createDebugCompatibleScreenManifests
      > Task :extractDeepLinksDebug
      > Task :mergeDebugResources
      > Task :processDebugMainManifest FAILED
      package="org.qtproject.example.annotatedurl" found in source AndroidManifest.xml: /home/qt/RTA/Qt_6.5.1/Examples/Qt-6.5.1/nfc/annotatedurl/bld_arm64-v8a/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.
      /home/qt/RTA/Qt_6.5.1/Examples/Qt-6.5.1/nfc/annotatedurl/bld_arm64-v8a/android-build/AndroidManifest.xml:16:9-50:16 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.
      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 1s
      9 actionable tasks: 9 executed
      Building the android package failed!
        -- For more information, run this command with --verbose.
      ninja: build stopped: subcommand failed. 

      nfc/ndefeditor compiles fine.

      Both examples were working with released Qt 6.5.0.

      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:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes