找不到参数create()的方法[crashlyticsStoreDeobsMyketRelease ...]

时间:2018-09-25 05:26:34

标签: android-studio crashlytics

我将Android更新至版本3.2。现在,当我要生成,清理或同步项目时,将执行以下错误调度:

Caused by: org.gradle.internal.metaobject.AbstractDynamicObject$CustomMessageMissingMethodException: 
Could not find method create() for arguments [crashlyticsStoreDeobsMyketRelease, class com.crashlytics.tools.gradle.tasks.StoreMappingFileTask, com.android.build.gradle.internal.scope.BuildArtifactsHolder$FinalBuildableArtifact@70c73c24] on task set of type org.gradle.api.internal.tasks.DefaultTaskContainer.
at org.gradle.internal.metaobject.AbstractDynamicObject.methodMissingException(AbstractDynamicObject.java:179)
at org.gradle.internal.metaobject.AbstractDynamicObject.invokeMethod(AbstractDynamicObject.java:164)
at org.gradle.api.internal.tasks.DefaultTaskContainer_Decorated.invokeMethod(Unknown Source)

build.Gradle(项目):

buildscript {
  repositories {
    jcenter()
    google()
    maven { url 'https://maven.fabric.io/public' }
  }
  dependencies {
    classpath 'com.android.tools.build:gradle:3.2.0'
    classpath 'com.google.gms:google-services:4.0.1'
    classpath 'com.google.firebase:firebase-plugins:1.1.5'
    classpath 'io.fabric.tools:gradle:1.26.0'
  }
}

Gradle-Wrapper.properties:

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip

预先感谢您的帮助。

1 个答案:

答案 0 :(得分:10)

我终于找到了解决方法:

手动将Gradle更新到最新版本。

替换Gradle-wrapper.properties的以下行:

distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip

具有:

distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip