First, let gradle set the correct distribution Url
cd projectDirectory
./gradlew wrapper --gradle-version 2.3.0
Then - might not be needed but that's what I did - edit the project's build.gradle to match the version
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Finally, delete the folders .gradle and gradle and the files gradlew and gradlew.bat. (Original Answer)
Now, rebuild the project.
As the other answers did not suffice for me and the comment pointing out these additional steps is easy to overlook, here as a separate answer