Android-AndroidStudio莫名其妙的錯誤-finished with non-zero exit value 1


上一篇博客,Android-AndroidStudio莫名其妙的錯誤-finished with non-zero exit value 1,解決了由於 string.xml 字符導致的;

而這篇博客是com.android.tools.build:gradle:xxxxxx原因導致的

 

點擊這個錘子🔨,就會報以下錯誤:

 一旦出現這種錯誤,說那個 style no resource found 找不到,都是瞎扯蛋,根本就不是所謂的資源找不到,在瞎搞

 

然后點擊Build APK

 

點擊Build APK后,是另外一個錯誤:

 

出現這個錯誤后,千萬不要點擊,否則就是火上澆油,更加亂

 

這個系列錯誤的原因是:APP/build.gradle/com.android.tools.build:gradle: 版本號不正確導致的

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

buildscript {
    
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:配置正確的版本號'
        

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

allprojects {
    repositories {
        google()
        jcenter()
    }
}

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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM