上一篇博客,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
}
Android-AndroidStudio莫名其妙的错误-finished with non-zero exit value 1