paperparcel
paperparcel copied to clipboard
Build failure with Kotlin 1.1.4-3 and KAPT.
Looks like the fields that are being generated have different names from the ones that are defined in the data class.
Data Class
@PaperParcel
data class User(
val id: Long,
val firstName: String,
val lastName: String
) : PaperParcelable {
companion object {
@JvmField val CREATOR = PaperParcelUser.CREATOR
}
}
Build Error
Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:compileDebugAndroidTestSources, :app:compileDebugUnitTestSources, :app:compileDebugSources]
Error:No field match found for the constructor parameter "arg0" in com.example.login.User. Constructor arguments are matched with fields via their name and type.
Error:No field match found for the constructor parameter "arg1" in com.example.login.User. Constructor arguments are matched with fields via their name and type.
Error:No field match found for the constructor parameter "arg2" in com.example.login.User. Constructor arguments are matched with fields via their name and type.
Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
PS: I am using Android Studio 3.-0 Beta 7
Did you apply the kotlin-kapt
plugin?