Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-23378

Signing of Android AAB bundle fails from Qt Creator

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: Qt Creator 4.11.0
    • Fix Version/s: None
    • Component/s: Android Support
    • Labels:
      None
    • Platform/s:
      macOS

      Description

      Using the latest Qt Creator with Qt 5.14.0:

      • macOS 10.15.2
      • openJDK 8
      • Android SDK Version: 26.1.1
      • Android NDK Version: 20.1.5948944
      • Targeting Android API 28
      • Gradle version 5.5.1
      • Android Gradle Plugin version 3.5.3

      If I enabled "Build .aab" and run the build from Qt Creator with verbose enabled, I receive this output at the end:

      Signing file [redacted]/android-build//build/outputs/apk/release/android-build-release-unsigned.apk
      jar signed.
      
      Warning: 
      The signer's certificate is self-signed.
      Signing file [redacted]/android-build//build/outputs/bundle/release/android-build-release.aab
      jarsigner command failed.
      jarsigner: unable to open jar file: /[redacted]/android-build//build/outputs/bundle/release/android-build-release.aab
      08:54:34: The process "/Applications/Qt/5.14.0/android/bin/androiddeployqt" exited with code 15.
      Error while building/deploying project [redacted] (kit: Android for armeabi-v7a,arm64-v8a,x86,x86_64 (Clang Qt 5.14.0 for Android))
      When executing step "Build Android APK"
      

      It looks like androiddeployqt is expecting the bundle to be output by gradle during the build process as "android-build-release.aab" but it is actually appearing in the output dir as "android-build.aab" and the jarsigner step fails.

      If I run jarsigner like this:

      jarsigner -sigalg SHA256withRSA -digestalg SHA-256 -keystore android_release.keystore -storepass [redacted] [redacted]/android-build/build/outputs/bundle/release/android-build.aab signing
      

      It completes successfully.

      I've tried updating everything in the Android environment and checked various versions of things and am left thinking this is a bug. Could be some setting I've got wrong but I'm clueless what it might be.

      If it is a bug, when somebody goes in to fix this, could you also please add code to output the jarsigner command when verbose is turned on? That would help with debugging this step.

        Attachments

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

          Activity

            People

            Assignee:
            portale Alessandro Portale
            Reporter:
            dhess David Hess
            Votes:
            9 Vote for this issue
            Watchers:
            11 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes