Could not find method create() for arguments [crashlyticsStoreDeobsDebug, class com.crashlytics.tools.gradle.tasks.StoreMappingFileTask, com.android.build.gradle.internal.scope.BuildArtifactsHolder$FinalBuildableArtifact@2ac9ac29] on task set of type org.gradle.api.internal.tasks.DefaultTaskContainer.
Project was in working state but since today build is failing with above error.
Android Studio 3.2 Preview.
Update: Check Mike's answer first!
Old answer:
It looks like Fabric released a new version thats breaks the build for some apps.
If you have the line io.fabric.tools:gradle:1.+
(which is recommended by Fabric, but not ideal) you will automatically use the new version.
In the meantime you can replace 1.+
with the latest "stable" version which is 1.25.4. io.fabric.tools:gradle:1.25.4
Mike from Fabric here. If you're using version 3.2
of the Android Studio Gradle plugin, upgrading to 4.10
of Gradle and 1.26.0
of the Fabric Gradle plugin will address this issue.
If you use a version of AS Gradle less then 3.2
, you won't encounter the issue, but also won't be getting the benefits of the latest release. You will hit this issue if you've updated to 3.2
of AS Gradle and 1.26.0
of Fabric's Gradle plugin, but are using a version of Gradle lower than 4.10
of Gradle.
when you update with android studio 3.2 and using fabric gradle version 1.+ then you have to change fabric gradle version 1.+ to 1.25.4 in biuld.gradle(project) file
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
//classpath 'io.fabric.tools:gradle:1.+' // old version
classpath 'io.fabric.tools:gradle:1.25.4' // new version
}
}
Note: Although the fabric gradle latest version is 1.26.0 but it's not stable version.stable version is 1.25.4. its work fine.
Update
classpath 'io.fabric.tools:gradle:1.+'
To
classpath 'io.fabric.tools:gradle:1.26.1'
https://docs.fabric.io/android/changelog.html#september-27-2018
Version 1.26.0
was the problem
You only need to update Gradle version (in Gradle-Wrapper.properties). for ex:
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
Following Mike's answer the file you need to change is in:
project\gradle\wrapper\gradle-wrapper.properties
The latest version is 4.10.2
.
For me, the problem appeared when I updated to AS 3.2-RC02 which requires the Android plugin 3.2.0-rc02
.
So I had to roll back to AS 3.1.4 which is the current stable version so I could downgrade my version of the Android plugin. I am using Android plugin 3.2.0-rc01
I also had to downgrade the fabric plugin to 1.24.4
Now seeing this with Gradle 5.1.1
Crashlytics version: 2.9.3
Gradle Tools version: 1.21.7
ERROR: Could not find method leftShift() for arguments [com.crashlytics.tools.gradle.tasks.FabricTaskBuilder$_pluginGenerateResources_closure4@28a32300] on task ':App:fabricGenerateResourcesDebug' of type org.gradle.api.DefaultTask.
来源:https://stackoverflow.com/questions/52474472/could-not-find-method-create-for-arguments-crashlytics-issue