问题描述
在我的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 RealmObjectclass 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.
推荐答案
- 我怕你必须.
- 为什么不呢?
您可以尝试将这些依赖项手动添加到您的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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!