LoginSignup
3
3

More than 5 years have passed since last update.

realm-javaでRealmProxyが生成されない

Posted at

RealmObjectから継承したクラス内で、ゲッター、セッターと認識出来る関数名があったとき、それに対応したメンバ変数が存在しないと、そこでアノテーションの処理が終了してしまうようです。
例えば、


class User extends RealmObject{
...


public boolean isCoach(){
  return true
}

のようなものがあって、


private boolean coach

と宣言されていなかった場合、実行時に
Could not find the copyOrUpdate() method in generated proxy class for io.realm.UserRealmProxy: Annotation processor may not have been executed.
のようなエラーが出ます。

発生する場合、ビルド時のgradleのメッセージに警告が出るのですが、ビルドは止まりませんでした。

3
3
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3