paperparcel icon indicating copy to clipboard operation
paperparcel copied to clipboard

kotlin_version = '1.2.20' kaptGenerateStubsReleaseKotlin FAILED at "com.android.library" module

Open shkrebets opened this issue 7 years ago • 0 comments

I have an app with 3 modules:mobile(mobile app), wear(watch app)and core(contains some common entities).

I tried to use paperparcel in mobile and core modules. In mobile module(plugin: 'com.android.application') it works fine, but in core module(plugin: 'com.android.library') this exception was caught: org.jetbrains.kotlin.util.ReenteringLazyValueComputationException

:core:kaptGenerateStubsReleaseKotlin FAILED

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':core:kaptGenerateStubsReleaseKotlin'.

Internal compiler error. See log for more details

My file in core module:

core->build.gradle:

apply plugin: 'com.android.library' apply plugin: "kotlin-android" apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-kapt'

android { compileSdkVersion 24 buildToolsVersion "23.0.2"

defaultConfig {
    minSdkVersion 19
}

}

dependencies { compile 'com.google.android.gms:play-services-wearable:8.1.0'

compile "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

compile 'nz.bradcampbell:paperparcel:2.0.0'
compile 'nz.bradcampbell:paperparcel-kotlin:2.0.0'
kapt 'nz.bradcampbell:paperparcel-compiler:2.0.0'

}

Also I enabled org.gradle.parallel and tried to add generateStubs = true but it didn't resolve this issue.

shkrebets avatar Jan 22 '18 13:01 shkrebets