Android 错误:无法找到FileOperations类型的服务,因为ProjectScopeServices已关闭
我将项目的Android 错误:无法找到FileOperations类型的服务,因为ProjectScopeServices已关闭,android,gradle,Android,Gradle,我将项目的build.gradle更改为: classpath 'com.android.tools.build:gradle:2.3.0-beta2' 到 现在我得到了这个错误: Gradle 'AndroidStudioProjects' project refresh failed Error:Cannot locate service of type FileOperations, as ProjectScopeServices has been closed. 我所有的build.
build.gradle
更改为:
classpath 'com.android.tools.build:gradle:2.3.0-beta2'
到
现在我得到了这个错误:
Gradle 'AndroidStudioProjects' project refresh failed
Error:Cannot locate service of type FileOperations, as ProjectScopeServices has been closed.
我所有的build.gradle
:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.4.0-alpha3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven { url "https://jitpack.io" }
jcenter()
mavenCentral()
}
}
我也有同样的问题,在读了一点之后,这是构建中的一个已知问题,他们正在解决它。不过,我还是设法解决了这个问题,至少是为了我自己。
我转到并手动下载了3.4.1,然后解压缩到我的驱动器 接下来,我进入设置>构建、执行、部署>渐变 我将其设置为使用本地Gradle分布,指向放置Gradle的位置。确保您选择的目录是当前版本的根目录,以便bin直接位于该目录下 在那之后,我成功地运行了一个干净的构建,然后再次同步gradle (哦,如果有人想知道,问题是
希望这有帮助!试着打电话给
gradlew stop
来停止gradle deamon,至少对我有用。它对我也有用
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.4.0-alpha3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven { url "https://jitpack.io" }
jcenter()
mavenCentral()
}
}