简体   繁体   English

在构建我的Android应用程序时,我遇到了Fabric和crashlytics的问题

[英]I have a problem with fabric and crashlytics when building my Android App

This is the error I am seeing. 这是我看到的错误。

Could not find method create() for arguments [crashlyticsStoreDeobsRelease, class com.crashlytics.tools.gradle.tasks.StoreMappingFileTask, com.android.build.gradle.internal.scope.BuildArtifactsHolder$FinalBuildableArtifact@1711854a] on task set of type org.gradle.api.internal.tasks.DefaultTaskContainer. 无法在类型组织的任务集上找到参数[crashlyticsStoreDeobsRelease,类com.crashlytics.tools.gradle.tasks.StoreMappingFileTask,com.android.build.gradle.internal.scope.BuildArtifactsHolder$FinalBuildableArtifact@1711854a]的方法create()。 gradle.api.internal.tasks.DefaultTaskContainer。

The cause of the issue seems incompatibility Fabric version with latest version of Gradle.The below works for me. 问题的原因似乎与最新版本的Gradle不兼容Fabric版本。以下对我有用。 Don't upgrade your Gradle version, Stick with your previous version and Sync the project once. 不要升级Gradle版本,坚持使用以前的版本并同步项目一次。

My Android Studio Version is 3.2 我的Android Studio版本是3.2

project.gradle project.gradle

dependencies {
        classpath 'com.android.tools.build:gradle:3.1.4'
    }

build.gradle 的build.gradle

buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.26.0'
    }
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

repositories {
    maven { url 'https://maven.fabric.io/public' }
}

For me this happened after upgrading to Android Studio 3.2 which come along with Gradle 4.6. 对我来说,这是在升级到与Gradle 4.6一起提供的Android Studio 3.2之后发生的。 So i switched back from 所以我换回了

classpath 'io.fabric.tools:gradle:1.26.0' 

to

classpath 'io.fabric.tools:gradle:1.25.4' 

for the moment. 暂时。

Try replacing the line io.fabric.tools:gradle:1.+ by the latest stable Fabric version which is 1.25.4. 尝试用最新的稳定Fabric版本io.fabric.tools:gradle:1.+替换行io.fabric.tools:gradle:1.+。 at the moment: io.fabric.tools:gradle:1.25.4 目前: io.fabric.tools:gradle:1.25.4io.fabric.tools:gradle:1.25.4io.fabric.tools:gradle:1.25.4

I had problem when I updated my Android studio from 3.1.4 to 3.2. 当我将Android工作室从3.1.4更新到3.2时,我遇到了问题。

The way I got the solution. 我得到解决方案的方式。 I changed in the Build.gradle (app). 我在Build.gradle(app)中进行了更改。

from

dependencies {
    classpath 'io.fabric.tools:gradle:1.+'
}

to

dependencies {
    classpath 'io.fabric.tools:gradle:1.25.4'
}

As others have mentioned, there's some type of conflict between io.fabric.tools:gradle:1.26.0, and Gradle 4.6. 正如其他人所提到的,io.fabric.tools:grad:1.26.0和Gradle 4.6之间存在某种冲突。 So I found the best solution, rather than roll back io.fabric.tools:gradle, seems to be to upgrade Gradle to the latest version, 4.10.2. 所以我找到了最好的解决方案,而不是回滚io.fabric.tools:gradle,似乎是将Gradle升级到最新版本4.10.2。 Seemed to work for my project without issue. 似乎没有问题为我的项目工作。

For me this happened after upgrading to Android Studio 3.2 which come along with Gradle 4.6. 对我来说,这是在升级到与Gradle 4.6一起提供的Android Studio 3.2之后发生的。 So i switched back to gradle 4.4 for the moment. 所以我暂时转回gradle 4.4。 Maybe a bug. 也许是个bug。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Android Fabric崩溃导致应用程序崩溃 - Android Fabric crashlytics causing app crash 在Android上运行应用程序时出现问题 - I have a problem when running the app on android Fabric Crashlytics报告显示一些字母而不是我的Android应用程序的类名 - Fabric Crashlytics reports display some letters instead of classes names of my Android App 在我的android firebase应用程序中安装Fabric Crashlytics后,这个Gradle构建错误是什么? - What is this Gradle build Error after installing Fabric Crashlytics in my android firebase app? 适用于 Android 的 Fabric Crashlytics 不起作用 - Fabric Crashlytics for Android not working 构建phonegap示例Android应用程序时出现问题 - Problem when building phonegap example android app 当我想在 Flutter 中调试我的应用程序时遇到问题 - I have problem when I want debug my app in Flutter 我的android应用程序的数据库SQLite的排序结果有问题 - I have a Problem with the sorting result of the database SQLite of my android app 当我将Firebase与Android Gradle连接时,我遇到了这个问题 - When I connect Firebase with my Android Gradle I have this problem Fabric Crashlytics 已关闭,但我的应用程序未迁移到 Firebase Crashlytics - Fabric Crashlytics is shutdown but my app doesn't migrate to Firebase Crashlytic
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM