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原因导致的

 

点击这个锤子??,就会报以下错误:

Android-AndroidStudio莫名其妙的错误-finished with non-zero exit value 1

 一旦出现这种错误,说那个 style no resource found 找不到,都是瞎扯蛋,根本就不是所谓的资源找不到,在瞎搞

Android-AndroidStudio莫名其妙的错误-finished with non-zero exit value 1

 

然后点击Build APK

Android-AndroidStudio莫名其妙的错误-finished with non-zero exit value 1

 

点击Build APK后,是另外一个错误:

Android-AndroidStudio莫名其妙的错误-finished with non-zero exit value 1

 

出现这个错误后,千万不要点击,否则就是火上浇油,更加乱

 

这个系列错误的原因是: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
}

 

Android-AndroidStudio莫名其妙的错误-finished with non-zero exit value 1

上一篇:黑马程序员——类似于spring的AOP框架


下一篇:[PWA] Add Push Notifications to a PWA with React in Chrome and on Android