Skip to content
This repository was archived by the owner on Apr 19, 2026. It is now read-only.
This repository was archived by the owner on Apr 19, 2026. It is now read-only.

Gradle error #3

Closed
Closed

Description

@YuchengWang

using android studio 2.3, windows 10, 64bit

Error:(4, 0) Declaring custom 'clean' task when using the standard Gradle lifecycle plugins is not allowed.
Open File

Gradle sync failed: Declaring custom 'clean' task when using the standard Gradle lifecycle plugins is not allowed.
Consult IDE log for more details (Help | Show Log)

Activity

  1. YuchengWang commented on Mar 20, 2017

    @YuchengWang
    Author

    idea.zip

    the below is log

  2. binnykmathew commented on Mar 21, 2017

    @binnykmathew

    I got the same error but was able to successfully build and also deploy after I commented out the following line from the build.gradle file

    /* task clean(type: Delete) {
    delete rootProject.buildDir
    } */

  3. tiagoalexbastos commented on Mar 26, 2017

    @tiagoalexbastos

    thanks @binnykmathew , solved with the comment.

  4. tanishq-rocks commented on Jun 26, 2018

    @tanishq-rocks

    /* task clean(type: Delete) {
    delete rootProject.buildDir
    } */
    comment like this..
    and then follow the instruction and it will start to download some files & gradle built successfully after sometime.it takes 3-4minute.

  5. Fleker commented on Jul 23, 2018

    @Fleker
    Contributor

    Are you still seeing this issue? I have not had any issues with using Gradle and the latest (3.1+) versions of Android Studio. I'll close this soon if there's no further issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions