I am using RxJava2 along with lambda. IDE is Android Studio. Getting following error when compiling.
Information:Gradle tasks [:app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources, :app:compileDebugSources, :app:compileDebugUnitTestSources, :app:compileDebugAndroidTestSources, :transport:generateDebugSources, :transport:generateDebugAndroidTestSources, :transport:mockableAndroidJar, :transport:prepareDebugUnitTestDependencies, :transport:compileDebugSources, :transport:compileDebugAndroidTestSources, :transport:compileDebugUnitTestSources]
Error:Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are io.socket.emitter.Emitter$Listener
Error:Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are io.reactivex.functions.Predicate
Error:Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are io.reactivex.functions.Consumer
Error:Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are io.socket.emitter.Emitter$Listener
Error:Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are io.socket.emitter.Emitter$Listener
Error:Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are io.reactivex.FlowableOnSubscribe
Error:Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are io.socket.emitter.Emitter$Listener
Error:Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are io.socket.emitter.Emitter$Listener
Error:Execution failed for task ':app:transformClassesWithPreJackPackagedLibrariesForDebug'.
com.android.build.api.transform.TransformException: com.android.builder.core.JackToolchain$ToolchainException: Jack compilation exception
Following my build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.communicator"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
jackOptions {
enabled true
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
configurations.all {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
ext {
rxlifecycleVersion = '2.0.1'
icepickVersion = '3.2.0'
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'io.reactivex.rxjava2:rxjava:2.0.7'
compile "com.trello.rxlifecycle2:rxlifecycle:$rxlifecycleVersion"
compile "com.trello.rxlifecycle2:rxlifecycle-android:$rxlifecycleVersion"
compile "com.trello.rxlifecycle2:rxlifecycle-components:$rxlifecycleVersion"
compile "frankiesardo:icepick:$icepickVersion"
provided "frankiesardo:icepick-processor:$icepickVersion"
compile project(path: ':transport')
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:design:25.3.1'
testCompile 'junit:junit:4.12'
}
Following sequence works.
- Change minSdkVersion to 25. Sync and make project.
- Change minSdkVersion to 15 again. Sync and make project.
But this makes compilation very slow and I need to follow this sequence after every single code change. Is there a better alternative?