Could not find method create() for arguments - Crashlytics issue

前端 未结 8 1371
夕颜
夕颜 2020-12-15 15:10
Could not find method create() for arguments [crashlyticsStoreDeobsDebug, class com.crashlytics.tools.gradle.tasks.StoreMappingFileTask, com.android.build.gradle.int         


        
相关标签:
8条回答
  • 2020-12-15 15:34

    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

    0 讨论(0)
  • 2020-12-15 15:34

    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.

    0 讨论(0)
  • 2020-12-15 15:38

    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
    
    0 讨论(0)
  • 2020-12-15 15:44

    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.

    0 讨论(0)
  • 2020-12-15 15:45

    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

    0 讨论(0)
  • 2020-12-15 15:50

    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.

    0 讨论(0)
提交回复
热议问题