Build fail with an exception


(jopab) #1

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


(Stefan Oehme) #2

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.


(jopab) #3

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?


(jopab) #4

i have changed the dependencies :

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

it’s the same


(Stefan Oehme) #5

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.


(jopab) #6

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

(Ong Rel) #7

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


(jopab) #8

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