1

Currently I need to build an Android library .aar file. In the library have network request so that I have to add Retrofit as library's dependencies.
My library build.gradle file look like:

dependencies {
    compile 'com.squareup.retrofit2:retrofit:2.3.0'
    compile 'com.squareup.retrofit2:converter-gson:2.1.0'
}

But when using aar file by

compile(name:'sdk-release', ext:'aar'){transitive=true} 

It's throw exception:

java.lang.NoClassDefFoundError

After research, I figured out that the Problem is "transitive dependencies".

Do we have any solution to fix this problem?

Many thanks.

Ngo Van
  • 857
  • 1
  • 21
  • 37

0 Answers0