Build fail with an exception

bug with gradle 3, works with 2.14

Gradle version 2.2 is required. Current version is 3.0. If using the gradle wrapper, try editing the distributionUrl in D:\windev dev\v21\mobile\loca-bière mobile\Android\Generation\gradle\wrapper\gradle-wrapper.properties to gradle-2.2-all.zip
As com.android.build.gradle.overrideVersionCheck is set, continuing anyways.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'Generation'.
> org.gradle.api.internal.tasks.DefaultTaskInputs$TaskInputUnionFileCollection cannot be cast to org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection

can anyone help me?

thanks

Gradle Version: 3
Operating System: windows 7
Is this a regression? If yes, which version of Gradle do you know it last worked for? 2.14

This is not a bug. The error message says that the version of Android Build Tools does not work with Gradle 3.0. You’ll have to upgrade your version of Android Build Tools.

my build tool version is 24

(in my build.gradle file)
android {
compileSdkVersion 23
buildToolsVersion '24.0.1’
useLibrary ‘org.apache.http.legacy’

what version do i need?

i have changed the dependencies :

dependencies {
		classpath 'com.android.tools.build:gradle:2.1.2'

it’s the same

It seems that the Android build tools don’t provide a version compatible with Gradle 3.0 yet. You can always find the latest changes on their website.

newest dependencies

dependencies {
		classpath 'com.android.tools.build:gradle:2.1.3'

update android sdk platform tools : 24.0.2

same error

Erreur retournée :
Incremental java compilation is an incubating feature.
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'Generation'.
> org.gradle.api.internal.tasks.DefaultTaskInputs$TaskInputUnionFileCollection cannot be cast to org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Have you figured out how to fix this yet? I encounter the same issue.

no
tested today with gradle 3.1
same error

What went wrong:
A problem occurred configuring root project 'Generation'.
> org.gradle.api.internal.tasks.DefaultTaskInputs$TaskInputUnionFileCollection cannot be cast to org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection