本文介绍了crashlytics机器人工作室gradle这个构建失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了插件crashlytics到Android 0.9.3工作室;在此之后,我添加到我的项目;它补充线摇篮,第一项活动...等;在此之后构建失败,此错误:

I have installed crashlytics plugin to android studio 0.9.3; after this I added to my project; It added lines to gradle, first activity and so on...; after this build fails with this error:

错误:执行失败的任务:应用程序:fabricCleanu presourcesDebug。

Crashlytics开发工具的错误。

Crashlytics Developer Tools error.

下面是我的文件的gradle,我应该怎么改? Crashlytics补充,将自动行:

Here is my gradle file, what should I change ? Crashlytics added it's lines automatically:

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

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

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

android {
  compileSdkVersion 21
  buildToolsVersion "21.0.2"

  defaultConfig {
    applicationId "XXXXXXXXXXXXXXXXXXXXXXX"
    minSdkVersion 11
    targetSdkVersion 19
    versionCode 1
    versionName "1.0"
  }
  buildTypes {
    release {
      runProguard false
      proguardFiles getDefaultProguardFile('proguard-android.txt'),
      'proguard-rules.pro'
    }

  }
}

dependencies {
  compile fileTree(dir : 'libs', include : ['*.jar'])
  compile 'com.android.support:appcompat-v7:21.0.0'
  compile('com.crashlytics.sdk.android:crashlytics:2.1.0@aar') {
    transitive = true;
  }
}

推荐答案

我已经解决了这个问题。
我曾与crashlytics团队促膝长谈,但他们并没有帮助我。

I have solved the issue. I had long conversation with crashlytics team, but they didn't helped me.

我的解决方法是创建单独的项目,并在该项目安装crashlytics。这将生成该项目的API密钥。我刚才复制的钥匙并粘贴到我原来的项目和它的工作。不知道为什么它没有发生在我最初的项目的关键。

My solution is to create separate project, and install crashlytics on that project. It will generate api key on that project. I just copied that key and pasted to my original project and it worked. Have no idea why it didn't generated the key on my initial project.

这篇关于crashlytics机器人工作室gradle这个构建失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-14 21:42