andrewedgar
andrewedgar

Reputation: 877

ClassNotFoundException with imported. aar

I am using two internal libraries in a company project. I imported the .aar files, then added them as dependences in Projedt Structure-> "+" button under declared dependencies. That generated the following lines in my app-level gradle file:

dependencies {

implementation project(path: ':libprinter-debug')
implementation project(path: ':libprinter-release')

}

I"m still getting this error

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/github/rholder/retry/RetryerBuilder;

Caused by:

java.lang.ClassNotFoundException: Didn't find class "com.github.rholder.retry.RetryerBuilder" on path: DexPathList[[zip file "/data/app/com.company.appname-2/base.apk"],nativeLibraryDirectories=[/data/app/com.company.appname-2/lib/arm, /vendor/lib, /system/lib]]

None of the other instances of this question yielded a solution. I've cleaned and rebuilt several times. What did I miss?

Upvotes: 2

Views: 1145

Answers (1)

laalto
laalto

Reputation: 152787

AAR files don't come with transitive dependencies. If the libraries depend on other libraries, you need to add them separately.

Searching with the class name, looks like you'd need at least

implementation "com.github.rholder:guava-retrying:2.0.0"

Upvotes: 4

Related Questions