2

I am new to Android / Java developing, and google helpt me until so far, so good..

But now I try to load Vitamio, what is not very easy to be honest.. After a lot of pain with Gradle, .so file-includes and NDK.. I am stuck with the following error.

:app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:compileDebugNdk UP-TO-DATE :app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE :app:prepareComAndroidSupportSupportV42220Library UP-TO-DATE :app:prepareMeNeavoVitamio422Library UP-TO-DATE :app:prepareDebugDependencies :app:compileDebugAidl UP-TO-DATE :app:compileDebugRenderscript UP-TO-DATE :app:generateDebugBuildConfig UP-TO-DATE :app:generateDebugAssets UP-TO-DATE :app:mergeDebugAssets UP-TO-DATE :app:generateDebugResValues UP-TO-DATE :app:generateDebugResources UP-TO-DATE :app:mergeDebugResources UP-TO-DATE :app:processDebugManifest UP-TO-DATE :app:processDebugResources UP-TO-DATE :app:generateDebugSources UP-TO-DATE :app:compileDebugJava UP-TO-DATE :app:preDexDebug :app:dexDebug UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dex.DexException: Multiple dex files define Lio/vov/vitamio/BuildConfig; 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) Error:Execution failed for task ':app:dexDebug'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2

The error gets triggered over here->

com.android.dex.DexException: Multiple dex files define Lio/vov/vitamio/BuildConfig

Google tels me there has to be some duplicate dependency.. But I cannot find the 'duplicate'...

Any tips?

Thanks!

P.S I use Android studio

Update StackOverflow does not like it when I post a gradle file... So I took a screenshot.

enter image description here

Update 2

All over google people mention that .jar files has to be removed.. But there are no .jar files in my project anymore (at least as far I know).

enter image description here

Update 3

This is my manifest-merger-debug-report

INJECTED from AndroidManifest.xml:0:0 reason: use-sdk injection requested
>MERGED from me.neavo:vitamio:4.2.2:2:5
>MERGED from com.android.support:support-v4:22.2.0:20:5
    android:targetSdkVersion
        INJECTED from AndroidManifest.xml:0:0
        INJECTED from AndroidManifest.xml:0:0
    android:minSdkVersion
        INJECTED from AndroidManifest.xml:0:0
        INJECTED from AndroidManifest.xml:0:0
DutchKevv
  • 1,659
  • 2
  • 22
  • 39
  • 1
    show us your gradle files – Karol Żygłowicz Jul 01 '15 at 11:29
  • 1
    https://stackoverflow.com/questions/25103288/multiple-dex-files-define-my-package-buildconfig-cant-find-the-cause and in general: [This google search query](https://www.google.com/search?q=android+Multiple+dex+files+define+Lio%2Fvov%2Fvitamio%2FBuildConfig&oq=android+Multiple+dex+files+define+Lio%2Fvov%2Fvitamio%2FBuildConfig&aqs=chrome..69i57.1465j0j7&sourceid=chrome&es_sm=93&ie=UTF-8) – Marcin Orlowski Jul 01 '15 at 11:32
  • @MarcinOrlowski Thanks for the tips.. I tried it with dexOptions { preDexLibraries = false }.. But then I get the error "java.lang.IllegalArgumentException: already added: Lio/vov/vitamio/BuildConfig"; – DutchKevv Jul 01 '15 at 11:37
  • 1
    what is the package name within your AndroidManifest.xml ? – Peter P Jul 01 '15 at 11:41
  • @PeterP, package="com.example.afterparty.app" – DutchKevv Jul 01 '15 at 11:42
  • 1
    do you have any libs in your lib folder? – Peter P Jul 01 '15 at 11:46
  • I only have the armeabi dirs.. That hold the .so files.. To fix the previous error: http://stackoverflow.com/questions/31150022/android-gradle-copy-to-native-libs/31150076?noredirect=1#comment50310501_31150076 – DutchKevv Jul 01 '15 at 11:53
  • Just by looking at everything you posted, please make sure you are using the latest Android plugin which is `1.2.3`. Why compile with Java6? – Jared Burrows Jul 01 '15 at 12:11
  • Hi @JaredBurrows..Thanks! I updated the build.gradle to 1.2.3 and removed the compileOptions, but problem stays... I'm stuck with it for 2 days already.. Think I will just start from scratch once again... – DutchKevv Jul 01 '15 at 12:21

0 Answers0