-
Notifications
You must be signed in to change notification settings - Fork 583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SugarORM doesn't work with multi-dex #267
Comments
Have you tried setting the domain classes field in the manifest? Set it to the topmost package name for the set of models you want to persist. See here: |
Hi. Thanks for your reply. I already have that field in the manifest indeed. One thing I noticed is that I'm using release 1.3 from maven repository, but it´s a one year old jar with 145 commits behind master. Do you think this bug might be fixed in master already? Why isn't there a new version released? Any known bug in master? I'd prefer to use gradle dependency rather that library project. |
Give it a test with the master branch and let me know if this bug persists. If it does, I'll do a deeper dive and try to get to the bottom of it. I understand a gradle dependency is the preferred way of grabbing the library. Unfortunately I believe @satyan is away right now, and he's the only one with write access to maven central for this library. |
Is this bug fixed now? I met the same issue that Sugar cannot create all tables when I enable multi-dex. |
I ran into this issue too, I found out that when MultiDex is enabled, the ReflectionUtil class does not scan all the dex files for entity classes correctly, I think it scans the first one only. I've forked the project and provided a fix for that: https://github.com/bendaniel10/sugar |
@bendaniel10 yes, that's the issue. I fixed it few months ago, but @satyan perhaps is away. #327 |
Is it fixed? I have version 1.4 and still have this problem. |
@bendaniel10 could you provide a pull request to fix this? |
I have a project which uses SugarORM and it was working fine until I enabled multi-dex. After that I've noticed that sometimes the app doesn't create all the db tables in the device. I suspect it's because when it loads dynamically the domain classes, it only picks up the ones in classes.dex and not in the other dex files. So if unfortunately the domain classes are packed in classes2.dex for example, then the db tables for them are not created during start up.
The text was updated successfully, but these errors were encountered: