Reputation: 117
I want to save bitmap into Realm DB. I converted bitmap into ByteArray and created Realm model class:
@RealmClass
open class PictureModel : RealmObject() {
@PrimaryKey
var id: String = ""
var picture : ByteArray = byteArrayOf()
}
but during compilation it gives me an error:
w: warning: Unclosed files for the types; these types will not undergo annotation processing
Realm is supposed to support java byte[]
but what about Kotlin ByteArray
or Array<Byte>
Upvotes: 2
Views: 1385
Reputation: 110
Try this :
open class Test : RealmObject() {
@PrimaryKey
var id: String? = null
var picture: ByteArray? = null
}
Upvotes: 2