You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a library project in my application. In the library project I am using Realm as local db and in the main project also I am using realm as local database.
In the library project I have few RealmObject classes. When I created a RealmObject class in the main project while running the code I am getting the below exception.
Error:Execution failed for task ':app:dexDebug'.
com.android.ide.common.internal.LoggedErrorException: Failed to run command:
C:\Users\cdara\AppData\Local\Android\sdk\build-tools\21.1.2\dx.bat --dex --no-optimize --output C:\Users\cdara\Documents\SVN\RapidInpectDBSSync\app\build\intermediates\dex\debug --input-list=C:\Users\cdara\Documents\SVN\RapidInpectDBSSync\app\build\intermediates\tmp\dex\debug\inputList.txt
Error Code:
2
Output:
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Lio/realm/DefaultRealmModule;
at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:303)
at com.android.dx.command.dexer.Main.run(Main.java:246)
at com.android.dx.command.dexer.Main.main(Main.java:215)
at com.android.dx.command.Main.main(Main.java:106)
Can you please help me in fixing that.
Thank you,
Chandana Dara
The text was updated successfully, but these errors were encountered:
If you are using Realm in both the library project and the app project you need to define a RealmModule in the library project to avoid conflicting with Realm in the main project. If you do not, you get the conflict error above. You can read more about it here: https://realm.io/docs/java/latest/#sharing-schemas
Hi,
I have a library project in my application. In the library project I am using Realm as local db and in the main project also I am using realm as local database.
In the library project I have few RealmObject classes. When I created a RealmObject class in the main project while running the code I am getting the below exception.
Error:Execution failed for task ':app:dexDebug'.
Can you please help me in fixing that.
Thank you,
Chandana Dara
The text was updated successfully, but these errors were encountered: