Kent Andersen
Kent Andersen

Reputation: 2201

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. enter image description here
  4. Click "Next"
  5. Try to build the App as the plugin instructs. enter image description here

Then when i try to build i get this:

package com.crashlytics.android does not exist enter image description here

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?

Upvotes: 9

Views: 9549

Answers (3)

Distwo
Distwo

Reputation: 11749

After the automated setup from android studio, I was missing this line:

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

Upvotes: 1

Thomas Keller
Thomas Keller

Reputation: 6060

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

Upvotes: 1

alphonzo79
alphonzo79

Reputation: 928

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.

Upvotes: 3

Related Questions