Search code examples
android-studioacra

Can we add ACRA as maven repository instead of local one?


At the moment, I add ACRA in the Gradle via compile files('libs/acra-4.5.0.jar').

Is there a way to use Maven repository (remote dependency library) and instead of compile file use a link such as compile 'com.acra.blah.blah:version-of-acra'?


Solution

  • In your app dependencies closure replace compile files('libs/acra-4.5.0.jar')

    with

    compile 'ch.acra:acra:4.5.0'
    

    Make sure that your repositories closure includes mavenCentral()

    I should say, for completeness, that this is easy to find. Go to http://mvnrepository.com and search for acra. Select the version you want and then click on the gradle tab and there you will find the repo definition.