相关疑难解决方法(0)

Gradle版本3.3不支持BuildActionExecuter上的toTask()方法

我刚刚将我的Android Studio更新为3.0 canary 1.现在我正在使用Android Studio 3.0 canary 1上的现有项目.默认情况下,gradle:我的项目中设置了3.0.0-alpha1:gradle_file.所以我将我的gradle版本更改为2.2.3,现在我收到此错误:

错误:无法完成Gradle执行.

原因:您正在使用的Gradle版本(3.3)不支持BuildActionExecuter上的forTasks()方法.Gradle 3.5和所有更高版本都支持此功能.

我在这里附上我的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.2.3'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
Run Code Online (Sandbox Code Playgroud)

gradle android-studio-3.0

111
推荐指数
5
解决办法
8万
查看次数

错误:在锁定文件中找到意外的锁定协议.预计3,发现0

将Android Studio升级到1.3后,我无法再编译项目了.我到了Unexpected lock protocol found in lock file. Expected 3, found 0..我试过删除我的.gradle文件夹,但这并没有解决问题.还有什么我能做的吗?

android gradle android-gradle-plugin

55
推荐指数
10
解决办法
6万
查看次数

更新到Android Studio 2.3之后,构建gradle无法构建

错误:无法打开zip文件.

Gradle的依赖性缓存可能已损坏(这有时会在网络连接超时后发生.)

<a href="syncProject">Re-download dependencies and sync project (requires network)</a>
<a href="syncProject">Re-download dependencies and sync project (requires network)</a>
Run Code Online (Sandbox Code Playgroud)

这发生在昨天.我无法运行任何旧项目,虽然我有良好的互联网连接,但我无法下载此依赖项.

android

5
推荐指数
1
解决办法
9465
查看次数