First of all: This is not a duplicate of this
Error:Could not find property 'assembleDebug' on project ':app'
The problem:
Since the update to Android Studio 2.2 (gradle plugin 2.2) You can no longer make the task assembleDebug
or assembleRelease
to be dependent on a new task in this way:
assembleDebug.dependsOn 'checkstyle'
More details in this issue
It gives you the following error:
Error:Could not get unknown property 'assembleDebug' for project ':app' of type org.gradle.api.Project.