[英]“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. 我在sdk中下载了所有软件包,我下载了两次关于zipAlign的软件包,但它没有解决我的问题。
Please help. 请帮忙。 Thank you.
谢谢。
If you're using Gradle, updating the Gradle plugin from 0.10 to 0.11 worked for me: 如果您正在使用Gradle,那么将Gradle插件从0.10更新为0.11对我有用:
buildscript {
...
dependencies {
...
classpath 'com.android.tools.build:gradle:0.11.+'
}
}
In case you run into the following Gradle build error after updating your Android SDK: 如果您在更新Android SDK后遇到以下Gradle构建错误:
A problem was found with the configuration of task ':MyApp:zipalignRelease'.
在任务':MyApp:zipalignRelease'的配置中发现了一个问题。
File '/home/user/SDKs/android-sdk-linux_x86/tools/zipalign' specified for property 'zipAlignExe' does not exist.为属性'zipAlignExe'指定的文件'/ home / user / SDKs / android-sdk-linux_x86 / tools / zipalign'不存在。
Therefore, I updated the android-sdk-setup script to also symlink zipalign
. 因此,我将android-sdk-setup脚本更新为symlink
zipalign
。 Gradle now finds what it is looking for. Gradle现在可以找到它想要的东西。 Happy building!
快乐的建筑!
I got the answer here: http://tech.sarathdr.com/questions/question/gradle-is-failing-with-new-android-sdk-versio-zipalign-is-missing 我在这里得到了答案: 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. 它说:新的android sdk版本(23)不包含文件zipalign文件。 You can download the old version of android sdk and copy zipalign file to the tools folder
您可以下载旧版本的android sdk并将zipalign文件复制到tools文件夹
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. 转到
C:\\...\\Users\\your-name\\AppData\\Local\\Android\\sdk\\build-tools
你必须要建立工具。 than there you will get list of build tools. 比那里你会得到构建工具列表。
Here you have to just copy Zipalign.exe
from older to newer version . 在这里,您只需将
Zipalign.exe
从较旧版本复制到较新版本。
It worked for me. 它对我有用。 I used it in
BluetoothLegatt
sample code. 我在
BluetoothLegatt
示例代码中使用它。
In Windows, make sure your ANDROID_HOME is pointing to the right folder. 在Windows中,确保您的ANDROID_HOME指向正确的文件夹。 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: 我更新了它,但我忘了指向较新的SDK文件夹:
C:\Program Files\adt-bundle-windows-x86_64-20140702\sdk
Now I'm sure I'm using the last SDK tools for Android. 现在我确定我正在使用Android的最新SDK工具。
Ok, now update the gradle script: 好的,现在更新gradle脚本:
dependencies {
classpath 'com.android.tools.build:gradle:0.12.+'
}
and 和
android {
buildToolsVersion "19.1"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.