获取io.realm.exceptions.RealmException:试图获得一种境界对象时无法找到生成的ValidationList类 [英] Getting io.realm.exceptions.RealmException: Could not find the generated ValidationList class when trying to get a Realm object

查看:906
本文介绍了获取io.realm.exceptions.RealmException:试图获得一种境界对象时无法找到生成的ValidationList类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以提供一些code,但基本上我得到这个例外在

I could provide some code, but basically i get this exception at a

this.realm = Realm.getInstance(context);

当然上下文不为空。

Of course context is not null.

任何想法?

堆栈跟踪:

Caused by: io.realm.exceptions.RealmException: Could not find the generated ValidationList class
at io.realm.Realm.createAndValidate(Realm.java:203)
at io.realm.Realm.create(Realm.java:181)
at io.realm.Realm.getInstance(Realm.java:159)
at io.realm.Realm.getInstance(Realm.java:128)
at com.ithurts.robertharkai.baseproject.realm.realmObjects.RealmHelper.<init>(RealmHelper.java:28)
at com.ithurts.robertharkai.baseproject.activites.MainActivity.succesfulLoginEvent(MainActivity.java:123)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.squareup.otto.EventHandler.handleEvent(EventHandler.java:89)
at com.squareup.otto.Bus.dispatch(Bus.java:384)
at com.squareup.otto.Bus.dispatchQueuedEvents(Bus.java:367)
at com.squareup.otto.Bus.post(Bus.java:336)
at com.ithurts.robertharkai.baseproject.providers.MainThreadBusProvider.post(MainThreadBusProvider.java:42)
at com.ithurts.robertharkai.baseproject.tasks.LogInUserTask.onPostExecute(LogInUserTask.java:50)
at com.ithurts.robertharkai.baseproject.tasks.LogInUserTask.onPostExecute(LogInUserTask.java:18)
at android.os.AsyncTask.finish(AsyncTask.java:631)
at android.os.AsyncTask.access$600(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5041)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)

应用程序的build.gradle:
http://pastebin.com/PmS2WnGk

Application build.gradle: http://pastebin.com/PmS2WnGk

项目构建:gradle这个:
http://pastebin.com/5zdYvhnw

Project build:gradle: http://pastebin.com/5zdYvhnw

推荐答案

从埃马努埃莱这里境界

它看起来像注释处理器不踢,你的build文件证实了。

It looks like the annotation processor is not kicking in and your build file confirms that.

尝试添加类似:

易文件(库/境界的注解处理器的0.70.0.jar')

要你的依赖

这篇关于获取io.realm.exceptions.RealmException:试图获得一种境界对象时无法找到生成的ValidationList类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆