Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure with Kotlin 1.1.4-3 and KAPT. #202

Open
rjoncontract opened this issue Oct 11, 2017 · 1 comment
Open

Build failure with Kotlin 1.1.4-3 and KAPT. #202

rjoncontract opened this issue Oct 11, 2017 · 1 comment

Comments

@rjoncontract
Copy link

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

@grandstaish
Copy link
Owner

Did you apply the kotlin-kapt plugin?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants