代码之家  ›  专栏  ›  技术社区  ›  Martin Erlic

警告:使用RealmObject模型调试时,类型的未关闭文件

  •  3
  • Martin Erlic  · 技术社区  · 6 年前

    这是我第一次尝试将Realm用作本地数据存储,但我遇到了一个我不理解的编译错误。我在其他任何地方都看不到这个错误的任何参考资料。怎么回事?

    import android.bluetooth.BluetoothDevice
    import io.realm.RealmObject
    import io.realm.annotations.PrimaryKey
    import io.realm.annotations.RealmClass
    
    @RealmClass
    open class DeviceItem(
    
            @PrimaryKey var id: Long = 0,
            var device: BluetoothDevice? = null,
            var deviceName: String= "",
            var address: String = "",
            connected: String = ""
    
    ) : RealmObject() {
    
        var connected: Boolean = false
            set
    
        init {
            this.connected = connected === "true"
        }
    
    }
    

    错误:

    warning: Unclosed files for the types '[io.realm.ca_test_test_DeviceItemRealmProxy]'; these types will not undergo annotation processing
    
    0 回复  |  直到 6 年前