cannot find zip-align when publishing app

后端 未结 25 1700
名媛妹妹
名媛妹妹 2020-11-29 18:00
cannot.find.zip.align=The zipalign tool was not found in the SDK.

Please update to the latest SDK and re-export your application
or run zipalign manually.

Aligning         


        
相关标签:
25条回答
  • 2020-11-29 18:45

    I used the full path of zipalign. For mac, I found the executable file in Finder and clicked on it. Then, to publish my app I ran

    /Users/username/development/sdk/tools/zipalign -v 4 HelloWorld-release-unsigned.apk HelloWorld.apk
    

    instead of

    zipalign -v 4 HelloWorld-release-unsigned.apk HelloWorld.apk
    
    0 讨论(0)
  • 2020-11-29 18:45

    zipalign was moved to build-tools\19.1.0 and build-tools\20.0.0, I assume you should use one of them in depend of your target SDK

    0 讨论(0)
  • 2020-11-29 18:45

    Google fix this mistake with the build tools version: 23.0.3 Now zipalign is packaged properly, and everything works fine.

    0 讨论(0)
  • 2020-11-29 18:46

    Steps to fix this,

    1. Install latest version of Android SDK Build-Tools
    2. Check if zipalign.exe is available in folder android-sdk\build-tools\ e.g. android-sdk\build-tools\21.1.0\
    3. In some older version of android you may not find zipalign.exe. Do not panic, check any other verion in which zipalign is available.
    4. Open your project.properties file and configure build-tools to point to the in which zipalign.exe is present. e.g. sdk.buildtools=21.1.0.
    5. Restart your eclipse and try exporting again. It should work.
    0 讨论(0)
  • 2020-11-29 18:47

    Mac / Linux:

    This worked for me (you might want to replace 22.0.1 with version of your build tools):

    Edit: ~/.bashrc

    export ANDROID_HOME=~/Android/Sdk/
    export ANDROID_TOOLS=~/Android/Sdk/tools/
    export ANDROID_BUILD_TOOLS=~/Android/Sdk/build-tools/22.0.1/
    export ANDROID_PLATFORM_TOOLS=~/Android/Sdk/platform-tools/
    PATH=$PATH:$ANDROID_HOME:$ANDROID_TOOLS:$ANDROID_PLATFORM_TOOLS:$ANDROID_BUILD_TOOLS
    

    And run:

    source ~/.bashrc
    

    or just close terminal and start it again.

    0 讨论(0)
  • 2020-11-29 18:49

    I had the same problem. And to fix it, I copy the Zipalign file from sdk/build-tools/android-4.4W folder to sdk/tools/

    Edited: Since Google updated SDK for Android, new build-tools does fix this problem. So I encouraged everyone to update to Android SDK Build-tools 20 as suggested by Pang in the post below.

    0 讨论(0)
提交回复
热议问题