Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Incorrect APK directory

Incorrect APK directory

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
5 Posts 2 Posters 1.9k Views 2 Watching
  • 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.
  • V Offline
    V Offline
    vlada
    wrote on last edited by vlada
    #1

    When building my project I get this error:

    Unable to open 'C:/QtProjects/build-MyApp-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_3_for_Android_armv7-release/android-build//build/outputs/apk/android-build-release-unsigned.apk' as zip archive
    zipalign command failed.

    Of course it failed because the unsigned APK is not in this directory. There are 2 errors in the path. The first one, which probably wouldn't cause problems, is the duplicate slash between android-build//build. The more serious error in the path is the missing last subdirectory "release". So the correct path should be: C:/QtProjects/build-MyApp-Android_for_armeabi_v7a_GCC_4_9_Qt_5_9_3_for_Android_armv7-release/android-build/build/outputs/apk/release/android-build-release-unsigned.apk

    Why is the directory wrong and how can I fix it?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What version of Qt Creator are you using ?

      Did you modify any settings in it ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • V Offline
        V Offline
        vlada
        wrote on last edited by vlada
        #3

        I'm using the latest QtCreator (4.5) and tried it with both Qt 5.9 and 5.10. What I did was to update Android SDK (including NDK and Gradle) and changed the paths in settings to point to the current versions.

        The unsigned APK is built in the same directory as before but then QtCreator for some reason thinks it is somewhere else.

        Where does the path come from? I tried a fulltext search for the path in all files but I didn't find anything useful. Of course I tried to clean the build directory and cleaned all temporary files. But with no result.

        1 Reply Last reply
        0
        • V Offline
          V Offline
          vlada
          wrote on last edited by
          #4

          I did some more research and testing and the problem was probably the updated gradle plugin version in build.gradle. Originally there was this:

          buildscript {
              repositories {
                  jcenter()
              }
          
              dependencies {
                  classpath 'com.android.tools.build:gradle:2.2.3'
              }
          }
          

          But Android Studio updated it to the latest version by changing the plugin version to 3.0.1. That should mean that Gradle 4.1+ will be used and QtCreator probably isn't compatible with it.

          1 Reply Last reply
          0
          • V Offline
            V Offline
            vlada
            wrote on last edited by
            #5

            Somebody already filled this bug report.

            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