I have included legacy.jar in my module
& added that module in app dependency also, added android annotation processor library (annotationProcessor 'android.arch.persistence.room:compiler:1.0.0') https://developer.android.com/topic/libraries/architecture/adding-components.html
After running the project it is showing following error
Error:Execution failed for task ':task'. java.lang.NoSuchMethodError: org.apache.commons.codec.binary.Hex.encodeHexString([B)Ljava/lang/String;
But after removing annotation processor library project runs successfully.
I am not sure why this error occurs.
below are my both Gradle files for myModule & app
myModule Gradle file
dependencies {
compile files('libs/org.apache.http.legacy.jar')
}
app Gradle file
dependencies {
compile project(':myModule')
compile 'android.arch.lifecycle:extensions:1.0.0'
compile 'android.arch.persistence.room:runtime:1.0.0'
compile 'android.arch.paging:runtime:1.0.0-alpha3'
annotationProcessor 'android.arch.persistence.room:compiler:1.0.0'
}