【发布时间】:2020-08-12 23:46:19
【问题描述】:
我正在尝试运行我的颤振应用程序,但它给出了以下 gradle 错误,有人可以帮助我吗?我尝试了一些堆栈自己的解决方案,但没有解决。
我的代码 build.grade 是:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath 'com.google.gms:google-services:4.3.3'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
这个错误是: Message error
更新
我已经解决了上面的错误,但现在出现这样的错误,
FAILURE: Build failed with an exception.
* What went wrong:
Could not create service of type ScriptPluginFactory using
BuildScopeServices.createScriptPluginFactory().
> Could not create service of type FileHasher using
BuildSessionScopeServices.createFileSnapshotter().
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 6s
Gradle task assembleDebug failed with exit code 1
【问题讨论】:
-
我设法通过更改或颤动 sdk 解决了该错误,但我现在又遇到了另一个错误