Clyde
Clyde

Reputation: 7549

Gradle doesn't find acra

I have an Android project in which I have been using ACRA 4.6.0 with a static jar file, all working fine. I have tried to change this to use the latest ACRA by the maven dependency in build.gradle:

dependencies {
    compile fileTree(dir: 'libs', include: '*.jar')
    testCompile 'junit:junit:4.12'
    compile 'ch.acra:acra:4.8.5'
    compile 'com.android.support:appcompat-v7:23.4.0'
    compile 'com.android.support:design:23.4.0'
}

in my build.gradle. However this causes the build to fail with errors like:

CJApp.java:13: error: cannot find symbol
import org.acra.ACRAConfiguration;
           ^
symbol:   class ACRAConfiguration
location: package org.acra

So far as I can tell gradle is not downloading anything for acra. I have tried adding mavenCentral() to the repositories list with no effect.

What else do I need to do, and is there any way of determining just what gradle has downloaded?

Upvotes: 2

Views: 1115

Answers (2)

F43nd1r
F43nd1r

Reputation: 7749

ACRAConfiguration has moved to org.acra.config. Just adjust your import.

Upvotes: 2

Jolta
Jolta

Reputation: 2725

Are you sure that the class org.acra.ACRAConfiguration is included in the new version: acra:4.8.5 which you're suddenly linking to? If not, this is a simple matter of incompatibility. In that case, it should be resolved if you step the version back to 4.6.0.

Have you checked that the build downloads the file from Maven Central? This should be clearly visible when giving gradle the -i flag - it will print every URL as it downloads them.

Upvotes: 2

Related Questions