找不到io.realm.RealmObject [英] io.realm.RealmObject not found

查看:271
本文介绍了找不到io.realm.RealmObject的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的android库项目中,我将Realm作为Gradle插件安装(如 https中所述://realm.io/docs/java/latest/).

In my android library project, i install Realm as a Gradle plugin (as described in https://realm.io/docs/java/latest/).

当我将库项目(AAR文件)添加到我的应用程序项目中时,它无法生成并显示以下错误:无法访问RealmObject 找不到io.realm.RealmObject的类文件"

When I add my library project (aar file) into my application project, it can not build with error "cannot access RealmObject class file for io.realm.RealmObject not found"

我必须在应用程序项目中安装领域插件才能克服此错误.任何人都可以帮助我这种情况,我不想在应用程序项目中安装领域插件.

I have to install realm plugin in application project to overcome this error. Anyone can help me this situation, i do not want install realm plugin in application project.

推荐答案

我不想在应用程序项目中安装领域插件.

i do not want install realm plugin in application project.

  1. 我怕你必须.
  2. 为什么不呢?


您可以尝试将这些依赖项手动添加到您的Application项目中:


You could try to add those dependencies to your Application project by hand:

compile "io.realm:realm-android-library:$version"
compile "io.realm:realm-annotations:$version"

这篇关于找不到io.realm.RealmObject的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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