Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Signature problem (Android)
QtWS25 Last Chance

Signature problem (Android)

Scheduled Pinned Locked Moved Solved Installation and Deployment
9 Posts 6 Posters 3.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Francky033
    wrote on last edited by Francky033
    #1

    I have a signature problem when I try to generate a armebi-v7a application for Android:

    I get the following error message:

    BUILD SUCCESSFUL in 39s
    29 actionable tasks: 2 executed, 27 up-to-date
    Exception in thread "main" com.android.apksig.apk.ApkFormatException: Malformed ZIP Central Directory record #1 at file offset 20761847
    	at com.android.apksig.internal.apk.v1.V1SchemeVerifier.parseZipCentralDirectory(V1SchemeVerifier.java:1782)
    	at com.android.apksig.ApkVerifier.getAndroidManifestFromApk(ApkVerifier.java:429)
    	at com.android.apksig.ApkVerifier.verify(ApkVerifier.java:176)
    	at com.android.apksig.ApkVerifier.verify(ApkVerifier.java:125)
    	at com.android.apksigner.ApkSignerTool.verify(ApkSignerTool.java:466)
    	at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:112)
    Caused by: com.android.apksig.zip.ZipFormatException: Not a Central Directory record. Signature: 0xff9e45a7
    	at com.android.apksig.internal.zip.CentralDirectoryRecord.getRecord(CentralDirectoryRecord.java:143)
    	at com.android.apksig.internal.apk.v1.V1SchemeVerifier.parseZipCentralDirectory(V1SchemeVerifier.java:1780)
    	... 5 more
    Warning: QML import could not be resolved in any of the import paths: MyLib
    Warning: QML import could not be resolved in any of the import paths: MyLib
    Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.impl
    Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Fusion.impl
    Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Imagine.impl
    Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Material.impl
    Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Universal.impl
    Warning: QML import could not be resolved in any of the import paths: QtQuick.Extras.Private.CppUtils
    Warning: QML import could not be resolved in any of the import paths: QtQuick.Extras.Private.CppUtils
    apksigner command failed.
      -- Run with --verbose for more information.
    16:36:26: The process "E:\Qt\5.12.2\android_armv7\bin\androiddeployqt.exe" exited with code 15.
    Error while building/deploying project xxxxx  (kit: Android for armeabi-v7a (Clang Qt 5.12.2 for Android ARMv72))
    When executing step "Build Android APK"
    

    I use:
    Qt 5.12.2
    SDK 26.1.1
    NDK 19.2.5345600
    build-tools 28.0.3
    JDK: jdk1.8.0_181

    Everything was going until now. This is the first time I have received an error message of this type.

    Any ideas?

    Thanks!

    raven-worxR J.HilkJ 2 Replies Last reply
    0
    • F Francky033

      I have a signature problem when I try to generate a armebi-v7a application for Android:

      I get the following error message:

      BUILD SUCCESSFUL in 39s
      29 actionable tasks: 2 executed, 27 up-to-date
      Exception in thread "main" com.android.apksig.apk.ApkFormatException: Malformed ZIP Central Directory record #1 at file offset 20761847
      	at com.android.apksig.internal.apk.v1.V1SchemeVerifier.parseZipCentralDirectory(V1SchemeVerifier.java:1782)
      	at com.android.apksig.ApkVerifier.getAndroidManifestFromApk(ApkVerifier.java:429)
      	at com.android.apksig.ApkVerifier.verify(ApkVerifier.java:176)
      	at com.android.apksig.ApkVerifier.verify(ApkVerifier.java:125)
      	at com.android.apksigner.ApkSignerTool.verify(ApkSignerTool.java:466)
      	at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:112)
      Caused by: com.android.apksig.zip.ZipFormatException: Not a Central Directory record. Signature: 0xff9e45a7
      	at com.android.apksig.internal.zip.CentralDirectoryRecord.getRecord(CentralDirectoryRecord.java:143)
      	at com.android.apksig.internal.apk.v1.V1SchemeVerifier.parseZipCentralDirectory(V1SchemeVerifier.java:1780)
      	... 5 more
      Warning: QML import could not be resolved in any of the import paths: MyLib
      Warning: QML import could not be resolved in any of the import paths: MyLib
      Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.impl
      Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Fusion.impl
      Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Imagine.impl
      Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Material.impl
      Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Universal.impl
      Warning: QML import could not be resolved in any of the import paths: QtQuick.Extras.Private.CppUtils
      Warning: QML import could not be resolved in any of the import paths: QtQuick.Extras.Private.CppUtils
      apksigner command failed.
        -- Run with --verbose for more information.
      16:36:26: The process "E:\Qt\5.12.2\android_armv7\bin\androiddeployqt.exe" exited with code 15.
      Error while building/deploying project xxxxx  (kit: Android for armeabi-v7a (Clang Qt 5.12.2 for Android ARMv72))
      When executing step "Build Android APK"
      

      I use:
      Qt 5.12.2
      SDK 26.1.1
      NDK 19.2.5345600
      build-tools 28.0.3
      JDK: jdk1.8.0_181

      Everything was going until now. This is the first time I have received an error message of this type.

      Any ideas?

      Thanks!

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @Francky033
      have you tried deleting the whole build folder yet? and build again

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • F Offline
        F Offline
        Francky033
        wrote on last edited by
        #3

        Yes ! without result...

        1 Reply Last reply
        0
        • F Francky033

          I have a signature problem when I try to generate a armebi-v7a application for Android:

          I get the following error message:

          BUILD SUCCESSFUL in 39s
          29 actionable tasks: 2 executed, 27 up-to-date
          Exception in thread "main" com.android.apksig.apk.ApkFormatException: Malformed ZIP Central Directory record #1 at file offset 20761847
          	at com.android.apksig.internal.apk.v1.V1SchemeVerifier.parseZipCentralDirectory(V1SchemeVerifier.java:1782)
          	at com.android.apksig.ApkVerifier.getAndroidManifestFromApk(ApkVerifier.java:429)
          	at com.android.apksig.ApkVerifier.verify(ApkVerifier.java:176)
          	at com.android.apksig.ApkVerifier.verify(ApkVerifier.java:125)
          	at com.android.apksigner.ApkSignerTool.verify(ApkSignerTool.java:466)
          	at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:112)
          Caused by: com.android.apksig.zip.ZipFormatException: Not a Central Directory record. Signature: 0xff9e45a7
          	at com.android.apksig.internal.zip.CentralDirectoryRecord.getRecord(CentralDirectoryRecord.java:143)
          	at com.android.apksig.internal.apk.v1.V1SchemeVerifier.parseZipCentralDirectory(V1SchemeVerifier.java:1780)
          	... 5 more
          Warning: QML import could not be resolved in any of the import paths: MyLib
          Warning: QML import could not be resolved in any of the import paths: MyLib
          Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.impl
          Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Fusion.impl
          Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Imagine.impl
          Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Material.impl
          Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Universal.impl
          Warning: QML import could not be resolved in any of the import paths: QtQuick.Extras.Private.CppUtils
          Warning: QML import could not be resolved in any of the import paths: QtQuick.Extras.Private.CppUtils
          apksigner command failed.
            -- Run with --verbose for more information.
          16:36:26: The process "E:\Qt\5.12.2\android_armv7\bin\androiddeployqt.exe" exited with code 15.
          Error while building/deploying project xxxxx  (kit: Android for armeabi-v7a (Clang Qt 5.12.2 for Android ARMv72))
          When executing step "Build Android APK"
          

          I use:
          Qt 5.12.2
          SDK 26.1.1
          NDK 19.2.5345600
          build-tools 28.0.3
          JDK: jdk1.8.0_181

          Everything was going until now. This is the first time I have received an error message of this type.

          Any ideas?

          Thanks!

          J.HilkJ Offline
          J.HilkJ Offline
          J.Hilk
          Moderators
          wrote on last edited by
          #4

          @Francky033 I remember having something similar.

          That was due to special characters inside the app signing certificate a ü in my case.


          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


          Q: What's that?
          A: It's blue light.
          Q: What does it do?
          A: It turns blue.

          1 Reply Last reply
          0
          • F Offline
            F Offline
            Francky033
            wrote on last edited by
            #5

            @J.Hilk said in Signature problem (Android):

            app signing certificate

            I have found the source of the problem. In fact, apksigner is called before the end of the construction of the apk file, hence the error message about the structure of this file!

            In the build-tools directory of the Android SDK, it is therefore necessary to add a TIMEOUT in the apksigner.bat file

            1 Reply Last reply
            3
            • G Offline
              G Offline
              gizdolok
              wrote on last edited by
              #6

              I am having the exact same problem:

              Exception in thread "main" com.android.apksig.apk.ApkFormatException: Malformed ZIP Central Directory record #1 at file offset 12039139
              	at com.android.apksig.internal.apk.v1.V1SchemeVerifier.parseZipCentralDirectory(V1SchemeVerifier.java:1761)
              	at com.android.apksig.ApkVerifier.getAndroidManifestFromApk(ApkVerifier.java:408)
              	at com.android.apksig.ApkVerifier.verify(ApkVerifier.java:175)
              	at com.android.apksig.ApkVerifier.verify(ApkVerifier.java:124)
              	at com.android.apksigner.ApkSignerTool.verify(ApkSignerTool.java:431)
              	at com.android.apksigner.ApkSignerTool.main(ApkSignerTool.java:92)
              Caused by: com.android.apksig.zip.ZipFormatException: Not a Central Directory record. Signature: 0x3000
              	at com.android.apksig.internal.zip.CentralDirectoryRecord.getRecord(CentralDirectoryRecord.java:143)
              	at com.android.apksig.internal.apk.v1.V1SchemeVerifier.parseZipCentralDirectory(V1SchemeVerifier.java:1759)
              	... 5 more
              

              Since I am using a Mac OS, I don't have that apksigner.bat file.

              Any other idea how to fix this?

              1 Reply Last reply
              0
              • B Offline
                B Offline
                Benjamin do Brasil
                wrote on last edited by
                #7

                Hello,

                I have the same issue on MacOS. I tried to put a sleep 60 at the beginning of the apksigner script shell but it is not working...
                Does someone have a solution?

                I'm using Qt 5.13 for MAcOS with ANDROID NDK 18

                1 Reply Last reply
                0
                • B Offline
                  B Offline
                  Benjamin do Brasil
                  wrote on last edited by
                  #8

                  I reinstalled the ANDROID SDK and it is working now...

                  1 Reply Last reply
                  0
                  • F Offline
                    F Offline
                    Fogord
                    wrote on last edited by
                    #9
                    This post is deleted!
                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved