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

Issue updating from v1.5.1 to v1.6.1 for Android #914

Open
AndroidDeveloperLB opened this issue Jul 4, 2020 · 0 comments
Open

Issue updating from v1.5.1 to v1.6.1 for Android #914

AndroidDeveloperLB opened this issue Jul 4, 2020 · 0 comments

Comments

@AndroidDeveloperLB
Copy link

AndroidDeveloperLB commented Jul 4, 2020

For some reason, once I update, it complains about that I can't set one of the fields, but I do need to set the field:

@Entity
interface TLThemeResource : Parcelable, Persistable {
    @get:Key
    @get:Generated
    var id: Long
    var url: String
    var width: Int?
    var height: Int?
    val format: String?
    var deviceFilePath: String?
    var type: String

//    @get:OneToOne
//    val theme: TLTheme
}

Usage:

        val tlThemeResourceEntity = TLThemeResourceEntity()
        tlThemeResourceEntity.id=123L

Gradle:

//    https://mvnrepository.com/artifact/io.requery/requery https://github.com/requery/requery
//    final def requery_version = "1.6.1" // can't use this for some reason (something with error: Element "id" is read-only but has setter (Kotlin: change var to val))
    final def requery_version = "1.5.1"
    implementation "io.requery:requery:$requery_version"
    implementation "io.requery:requery-kotlin:$requery_version"
    implementation "io.requery:requery-android:$requery_version"
//    https://mvnrepository.com/artifact/io.requery/requery-processor
    kapt "io.requery:requery-processor:$requery_version"

On 1.5.1, it works fine. Once I use 1.6.1, it wants me to change it to val, but then I can't change it.

The error:

C:\Users\User\Desktop\MyApplication3\app\build\tmp\kapt3\stubs\debug\com\example\myapplication\TLThemeResource.java:11: error: Element "id" is read-only but has setter (Kotlin: change var to val)
    public abstract long getId();

Attached sample here:

My Application.zip

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

1 participant