本文介绍了Android:SugarORM和multidex的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用使用SugarORM的Android项目.现在方法的限制已大大增加,以至于我必须激活multidex支持.但是现在我对SugarORM有问题,它仅创建classes.dex文件中的表.似乎完全忽略了classes2.dex.这真的是Sugar中的错误吗,有什么好的方法可以绕过该问题吗?

I'm working with Android project that uses SugarORM. Now the method limit has increased so much that I have to activate multidex support. But now I have a problem with SugarORM, it creates only the tables that are in classes.dex file. It seems to ignore classes2.dex completely. Is that really a bug in Sugar and is there some good way to bypass the problem?

推荐答案

使用Multidex的Sugar ORM有一个错误.当反射api不在主要dex文件中时,反射api不会找到您的模型类,因此它不允许框架正确生成表.希望对您有所帮助.

There is a bug on Sugar ORM with Multidex. The reflection api doesn't find your model classes when they are out of primary dex file, so It doesn't allow the framework to generate your tables correctly. Hope that it helps.

这篇关于Android:SugarORM和multidex的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-23 04:47