I\'ve recently updated the android studio version of my project from 2.3 Canary 2 to 2.3 Canary 3. Since then the gradle build is failing every time with this error:
You may face this problem with your previous Project, We will notice that when you create a new application the Gradle build will complete successfully. So just copy paste the grade setting from new project to the previous project.
Steps:
1) Replace Dependencies in build.gradle (project) by this code :
classpath 'com.android.tools.build:gradle:2.3.0'
2) Replace distributionUrl in Gradle-wrapper.properties by this code:
distributionUrl=https://services.gradle.org/distributions/gradle-3.3-all.zip
3) Don't forget to use Gradle default wrapper in Project level setting.
See this picture for more information