2016-01-23 75 views
2

以來,我已經收到此錯誤,無法建立:zipAlignDebug輸入文件不存在錯誤

Error:A problem was found with the configuration of task ':app:zipalignDebug'. 
> File 'C:\User\...\app\build\outputs\apk\app-debug-unaligned.apk' specified for property 'inputFile' does not exist. 

我已經嘗試了所有的建議,並沒有什麼固定這個。有小費嗎?它正在開發alpha 2,但現在它給了我一個錯誤,說我的版本太舊了,我需要移動到更新的版本。謝謝!

// Top-level build file where you can add configuration options common to all sub-projects/modules. 

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

     // NOTE: Do not place your application dependencies here; they belong 
     // in the individual module build.gradle files 
    } 
} 

allprojects { 
    repositories { 
     jcenter() 
    } 
} 

task clean(type: Delete) { 
    delete rootProject.buildDir 
} 

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 23 
    buildToolsVersion "23.0.2" 

    defaultConfig { 
     applicationId "com.nwoodthorpe.waterloohacks" 
     minSdkVersion 17 
     targetSdkVersion 23 
     versionCode 1 
     versionName "1.0" 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
} 

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    testCompile 'junit:junit:4.12' 
    compile 'com.android.support:appcompat-v7:23.1.1' 
} 

回答

0

嘗試運行 '應用' 之前每次運行構建

+1

在Android Studio中選擇「構建 - >構建APK」對我來說確實有效 – sulai

+1

嘗試應用 - >任務 - >構建 - >在Gradle面板中構建。 – mkUltra