Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 821
Kent Andersen Avatar asked Sep 27 '13 17:09

Kent Andersen


2 Answers

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.

like image 145
alphonzo79 Avatar answered Sep 25 '22 16:09

alphonzo79


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

like image 41
Thomas Keller Avatar answered Sep 23 '22 16:09

Thomas Keller