无法压缩 apk android android studio 2.2

Unable to zipalign apk android android studio 2.2

我正在使用 android studio 2.2 preview 3 发布我的应用程序并生成签名的 apk。但是当我将 apk 上传到 google play 时我收到错误

You uploaded an APK that is not zip aligned. You will need to run a zip align tool on your APK and upload it again.    

我也尝试手动使用 zipalign 工具,但我收到错误验证失败的消息。
这是我的 build.gradle 文件

android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
    applicationId "blackdogs.newaomsi"
    minSdkVersion 16
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        zipAlignEnabled true
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'


    }
}}

这是 Android Studio 2.2 Preview 3 的一个已知问题,如 this blog post and this issue 中所述。

您必须下载 Preview 2 或使用稳定版 Android Studio。

知道了。错误是由于我使用的 gradle 版本。 已将 gradle 版本降级为

 'com.android.tools.build:gradle:2.1.2'

在下一个版本中解决

类路径'com.android.tools.build:gradle:2.2.0-alpha4'

引用link:https://code.google.com/p/android/issues/detail?id=212591