I was using Kotlin 1.3.21 for a long time together with kotlin-android-extensions plugin in experimental mode for a long time. Today I swtiched to Kotlin 1.3.30 just by bumping the version and now wherever I used @Parcelize annotation I see the error: Unresolved reference: Parcelize.
Here's how I enable android extensions:
apply plugin: 'kotlin-android-extensions' androidExtensions { experimental = true features = ["parcelize"] } Notice, that I tried without explicitly declaring required features and it didn't work as well.
Also notice that I use Grrovy Gradle DSL.
How can I enable Parcelizeback with Kotlin 1.3.30?
EDIT Here's my app level build.gradle
apply plugin: 'com.android.application' apply plugin: "de.mannodermaus.android-junit5" apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-android' apply plugin: 'kotlin-kapt' apply from: "../versions.gradle" android { compileSdkVersion 28 compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } defaultConfig { applicationId "com.myapp.dtt" minSdkVersion 18 targetSdkVersion 28 versionCode 1 versionName "1.0" vectorDrawables.useSupportLibrary = true } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } sourceSets { main.java.srcDirs += 'src/main/kotlin' test.java.srcDirs += 'src/test/kotlin' androidTest.java.srcDirs += 'src/androidTest/kotlin' } testOptions { junitPlatform { filters { engines { include 'spek2' } } } } } detekt { input = files("src/main/kotlin") baseline = file("detekt-baseline.xml") } androidExtensions { experimental = true features = ["parcelize"] } dependencies { kapt "com.google.dagger:dagger-compiler:$dagger_version" kapt "com.google.dagger:dagger-android-processor:$dagger_version" kapt "com.github.bumptech.glide:compiler:$glide_version" implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation "com.google.android.material:material:$material_version" implementation "androidx.lifecycle:lifecycle-runtime:$lifecycle_version" implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version" implementation "androidx.appcompat:appcompat:$appcompat_version" implementation "androidx.recyclerview:recyclerview:$recyclerview_version" implementation "androidx.constraintlayout:constraintlayout:$constraint_layout_version" implementation "com.google.dagger
Источник: https://stackoverflow.com/questions/557 ... lin-1-3-30
Мобильная версия