skip to Main Content

All my projects report this error? Is there a setting or option I need to change to resolve this error?

app: failed At 9/30/2021 2:47 PM with 1 error
   Task 'wrapper' not found in project ':app'.

Task 'wrapper' not found in project ':app'

* Try:
Run gradle tasks to get a list of available tasks.
Run with --stacktrace option to get the stack

Photo of the errors

3

Answers


  1. This is because your build.gradle file doesn’t have a wrapper task. Add this code to build.gradle:

    task wrapper(type: Wrapper){
       gradleVersion = '7.2'
    }
    

    You can replace 7.2 with the gradle version you want, then run gradle wrapper task.

    Login or Signup to reply.
  2. maybe your project’s structure is :


    yourProjectDir:  
     --> app:  
        --> build.gradle  
     --> otherModule1:  
     --> otherModule2:  
     --> build.gradle  
    

    The correct way to open the project is :
    Click build.gradle in the root directory ‘yourProjectDir’, not build.gradle in the ‘app’ dir.

    Login or Signup to reply.
  3. enter image description here

    Unlink unnecessary Gradle project and it will be fixed.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search