简体   繁体   中英

Android Crashlytics plugin not installing library

When using the Crashlytics plugin in intellij I follow these steps.

  1. Click plugin on toolbar.
  2. Select App
  3. Allow crashlytics to update AndroidManifest.xml as well has my first 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 在此输入图像描述

I look in my dependencies and library and the jar is nowhere to be found. 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. (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). Anyway, I now have the jar.

The following configuration should work for Gradle-based projects:

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

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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