Sometimes, it could happened the Gradle Wrapper is not present in your project.
So it could be difficult to execute a specific gradle’s task
To generate your Gradle Wrapper, you have to insert this block on your
build.gradle at the Project’s level, with your target gradle’s version
After this, run this task
Finally, your Gradle wrapper will appear in your Android Project and can be used.