org.gradle.api.internal.tasks.DefaultTaskInputs$TaskInputUnionFileCollection cannot be cast to org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection
There is another post that discusses this but that was for an older version.
I have:
ignisvulpis@namenlos:~/development/Android-IMSI-Catcher-Detector$ gradle -v
Gradle 3.2.1
Build time: 2016-11-22 15:19:54 UTC
Revision: 83b485b914fd4f335ad0e66af9d14aad458d2cc5
Groovy: 2.4.7
Ant: Apache Ant™ version 1.9.6 compiled on June 29 2015
JVM: 1.8.0_111 (Oracle Corporation 25.111-b14)
OS: Linux 4.4.0-53-generic amd64
What went wrong:
A problem occurred configuring project ‘:AIMSICD’.
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
// Sorry for the stupid title. The forum forced me.
You shouldn’t have to downgrade to an older version of Gradle. It’s actually better to move forward as you reap the benefits of other improvements in Gradle (most importantly performance). I believe to be able to use the Android plugin with the latest version of Gradle you’ll have to upgrade to the suggested Android plugin version.
The Android plugin likely uses internal APIs which simply became incompatible with API of Gradle 3.2.1. Therefore, the Android plugin released a new version to fix the issue. Is there any good reason not to upgrade to the latest Android plugin version?
Gradle itself doesn’t know about external plugins. It’s up to the plugin to make the determination if it is compatible. I believe the Android plugin have a check built-in at some point of time. They might have taken it out. You might want to ask on the mailing list/user forum.