Importing greenDAO from eclipse to Android studio 1.0 RC 2

451 Views Asked by At

I have a quite big eclipse project wich uses greenDAO and I want to import it to android studio.

I am running into quite a lot of trouble doing so. First using android studio import it included other projects and librarys related to mine but did not import dao. I than manually added greendao project wich found modules: DaoCore, DaoGenerator and DaoExampleGenerator I added dependency to the modules but I just get build error:

Error:Execution failed for task ':name:dexDebug'.

com.android.ide.common.internal.LoggedErrorException: Failed to run command: C:\Android\sdk\build-tools\21.1.1\dx.bat --dex --no-optimize --output path\build\intermediates\dex\debug --input-list=path\build\intermediates\tmp\dex\debug\inputList.txt Error Code: 2 Output: UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dex.DexException: Multiple dex files define Lde/greenrobot/daogenerator/DaoGenerator; 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:302) at com.android.dx.command.dexer.Main.run(Main.java:245) at com.android.dx.command.dexer.Main.main(Main.java:214) at com.android.dx.command.Main.main(Main.java:106)

all three modules not found. And all includes in the java files of greendao are ignored.

I googled that you need to make some changes in gradle but that was for new projects not an big existing one.

Please help.

0

There are 0 best solutions below