Emre Alparslan
Emre Alparslan

Reputation: 1042

"zipAlignExe' does not exist." error while running my project on Android Studio

I'm getting error below this,

Error:A problem was found with the configuration of task ':project1:zipalignDebug'.
> File 'D:\Program Files\Android Studio\sdk\tools\zipalign.exe' specified for property
'zipAlignExe' does not exist.

I downloaded all packages in sdk, I downloaded twice a packages about zipAlign but it didn't solve my problem.

Please help. Thank you.

Upvotes: 8

Views: 6105

Answers (5)

Abhay Shekhar
Abhay Shekhar

Reputation: 11

I got this error before, here's what I have done

Go to C:\...\Users\your-name\AppData\Local\Android\sdk\build-tools you have to reach up to build tools. than there you will get list of build tools. enter image description here

Here you have to just copy Zipalign.exe from older to newer version .

It worked for me. I used it in BluetoothLegatt sample code.

Upvotes: 1

Seraphim's
Seraphim's

Reputation: 12768

In Windows, make sure your ANDROID_HOME is pointing to the right folder. For me it was:

C:\Program Files\adt-bundle-windows-x86_64-20140321

I updated it but I forgot to point to the newer SDK folder:

C:\Program Files\adt-bundle-windows-x86_64-20140702\sdk

Now I'm sure I'm using the last SDK tools for Android.

Ok, now update the gradle script:

dependencies {
    classpath 'com.android.tools.build:gradle:0.12.+'
}

and

android {
    buildToolsVersion "19.1"

Upvotes: 0

JJD
JJD

Reputation: 51804

In case you run into the following Gradle build error after updating your Android SDK:

A problem was found with the configuration of task ':MyApp:zipalignRelease'.
File '/home/user/SDKs/android-sdk-linux_x86/tools/zipalign' specified for property 'zipAlignExe' does not exist.

Therefore, I updated the android-sdk-setup script to also symlink zipalign. Gradle now finds what it is looking for. Happy building!

Upvotes: 2

Pete Doyle
Pete Doyle

Reputation: 947

If you're using Gradle, updating the Gradle plugin from 0.10 to 0.11 worked for me:

buildscript {
    ...

    dependencies {
        ...
        classpath 'com.android.tools.build:gradle:0.11.+'
    }
}

Upvotes: 8

Mayur Shah
Mayur Shah

Reputation: 1019

I got the answer here: http://tech.sarathdr.com/questions/question/gradle-is-failing-with-new-android-sdk-versio-zipalign-is-missing

It says: New android sdk version (23) does not contain the file zipalign file. You can download the old version of android sdk and copy zipalign file to the tools folder

Upvotes: 2

Related Questions