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