简体   繁体   English

Android Crashlytics插件没有安装库

[英]Android Crashlytics plugin not installing library

When using the Crashlytics plugin in intellij I follow these steps. 在intellij中使用Crashlytics插件时,我按照以下步骤操作。

  1. Click plugin on toolbar. 单击工具栏上的插件。
  2. Select App 选择App
  3. Allow crashlytics to update AndroidManifest.xml as well has my first Activity. 允许crashlytics更新AndroidManifest.xml以及我的第一个Activity。 在此输入图像描述
  4. Click "Next" 点击下一步”
  5. Try to build the App as the plugin instructs. 尝试按插件指示构建应用程序。 在此输入图像描述

Then when i try to build i get this: 然后,当我尝试构建我得到这个:

package com.crashlytics.android does not exist 包com.crashlytics.android不存在 在此输入图像描述

I look in my dependencies and library and the jar is nowhere to be found. 我查看我的依赖项和库,jar无处可寻。 What am I missing that would cause the library to not be loaded? 我错过了哪些会导致库无法加载?

I solved this by following the maven instructions here https://crashlytics.com/downloads/maven and then just grabbing the jar from my .m2 and putting it in my libs folder. 我通过遵循这里的maven说明解决了这个问题https://crashlytics.com/downloads/maven然后从我的.m2抓住jar并将它放在我的libs文件夹中。 (This particular project was started as a maven project, then Maven was discarded and it has not yet been migrated to Gradle, so we're kind of in no-man's land). (这个特殊的项目是作为一个maven项目开始的,然后Maven被丢弃了,它还没有迁移到Gradle,所以我们在无人区域有点像)。 Anyway, I now have the jar. 无论如何,我现在有了罐子。

The following configuration should work for Gradle-based projects: 以下配置应适用于基于Gradle的项目:

buildscript {
    repositories {
        maven { url "http://download.crashlytics.com/maven" }
    }
    dependencies {
        classpath "com.crashlytics.tools.gradle:crashlytics-gradle:1.+"
    }
}
apply plugin: "crashlytics"
repositories {
    maven { url "http://download.crashlytics.com/maven" }
}
dependencies {
    compile "com.crashlytics.android:crashlytics:1.1.+"
}

Taken from https://crashlytics.com/downloads/gradle 取自https://crashlytics.com/downloads/gradle

从android studio自动安装后,我错过了这一行:

compile 'com.crashlytics.android:crashlytics:1.1.+'

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM