Gradle version 3.3 does not support forTask() method on BuildActionExecuter

后端 未结 10 1168
没有蜡笔的小新
没有蜡笔的小新 2020-12-07 17:04

I just updated my Android Studio to 3.0 canary 1. Now I am working on my existing project on Android Studio 3.0 canary 1. By default gradle:3.0.0-alpha1 is

相关标签:
10条回答
  • 2020-12-07 18:00

    Please follow the below steps:

    1. Open your project in android studio
    2. In Android menu, open gradle-wrapper.properties
    3. Change the distribution url line with the below line

    distributionUrl=https://services.gradle.org/distributions/gradle-4.1-all.zip

    1. Thats it. Build your project now.

    Screenshot is attached for more understanding.

    0 讨论(0)
  • 2020-12-07 18:03

    Change in the file "gradle-wrapper.properties".

    Put this line and Sync Project-

    distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
    

    This will work. For Check latest version services.gradle.org/distributions

    After changed, Sync Project, Clean and Rebuild project once from Build menu.

    0 讨论(0)
  • 2020-12-07 18:04

    Once add these with Top level Gradle

    // Top-level build file where you can add configuration options common to all sub-projects/modules.
    
    buildscript {
    
        repositories {
            maven { url 'https://maven.google.com' }
            jcenter()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:3.0.0-alpha9'
    
            // NOTE: Do not place your application dependencies here; they belong
            // in the individual module build.gradle files
        }
    }
    
    allprojects {
        repositories {
            jcenter()
            maven { url 'https://maven.google.com' }
        }
    }
    
    task clean(type: Delete) {
        delete rootProject.buildDir
    }
    
    0 讨论(0)
  • 2020-12-07 18:04
    1. Open gradle-wrapper.properties
    2. Replace:

      distributionUrl=https://services.gradle.org/distributions/gradle-3.3-all.zip

    With:

    distributionUrl=https://services.gradle.org/distributions/gradle-4.1-all.zip
    
    1. Now sync project

    Click here for more understand

    0 讨论(0)
提交回复
热议问题