Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJ Smillie
39,714 PointsI just tried this and now I'm getting an exception in the console when I run. Multiple Dex files...
Here is my error in Android Studio:
FAILURE: Build failed with an exception.
-
What went wrong: Execution failed for task ':app:dexDebug'.
com.android.ide.common.internal.LoggedErrorException: Failed to run command: /Applications/Android Studio.app/sdk/build-tools/android-4.4W/dx --dex --num-threads=4 --output /Users/jonathansmillie/howl/app/build/intermediates/dex/debug /Users/jonathansmillie/howl/app/build/intermediates/classes/debug /Users/jonathansmillie/howl/app/build/intermediates/dependency-cache/debug /Users/jonathansmillie/howl/app/build/intermediates/pre-dexed/debug/bolts-android-1.1.2-4bd54e7dac92e511ad104da639fcbde02056b27e.jar /Users/jonathansmillie/howl/app/build/intermediates/pre-dexed/debug/bolts-android-1.1.3-3d0b4ec2cf49aac1bd656382f18517ece4c388bf.jar /Users/jonathansmillie/howl/app/build/intermediates/pre-dexed/debug/classes-15bfbf0a44053599be299bbf0966e79424a19f94.jar /Users/jonathansmillie/howl/app/build/intermediates/pre-dexed/debug/classes-4901322641d7f7cac2184285fcaf9134b235ca0c.jar /Users/jonathansmillie/howl/app/build/intermediates/pre-dexed/debug/commons-io-2.4-fbb39ca1430d8b72b3d4b5af20ec4868a5a08282.jar /Users/jonathansmillie/howl/app/build/intermediates/pre-dexed/debug/internal_impl-20.0.0-338c57b0f5c6ba04de5d0b3e6968ad36c29d2b5d.jar /Users/jonathansmillie/howl/app/build/intermediates/pre-dexed/debug/Parse-1.7.1-db77d84a9d53f5ccb08576f3329cf5661dd463dd.jar /Users/jonathansmillie/howl/app/build/intermediates/pre-dexed/debug/picasso-2.3.4-dd92c095b7eb63a9e228d03932b4a86a8ec0c2c7.jar /Users/jonathansmillie/howl/app/build/intermediates/pre-dexed/debug/support-annotations-20.0.0-bca9cd8c8082330ef7549e0398af852faae531fd.jar Error Code: 2 Output:
UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dex.DexException: Multiple dex files define Lbolts/AggregateException; at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:594) at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:552) at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:533) at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:170) at com.android.dx.merge.DexMerger.merge(DexMerger.java:188) at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:439) at com.android.dx.command.dexer.Main.runMonoDex(Main.java:287) at com.android.dx.command.dexer.Main.run(Main.java:230) at com.android.dx.command.dexer.Main.main(Main.java:199) at com.android.dx.command.Main.main(Main.java:103)
I have worked out that there are multiple files defining Lbolts/AggregateException somewhere... but I don't know where...?
Does it have anything to do with the Parse bolts-android-1.1.3.jar library I have included?
Any help would be appreciated.
tshuutheniemvula
7,251 PointsDid you eventually find an answer to this? Same problem here.
J Smillie
39,714 PointsJ Smillie
39,714 PointsSo... I managed to establish that there is a problem with my .jar files in my apps libs directory. But I have now updated them to be accurate in build.gradle and app.iml
I'm still getting errors though.
Apparently my InboxActivity uses or overrides a deprecated API.
I get these red notes when I try and run my app:
Note: /Users/jonathansmillie/howl/app/src/main/java/com/wolfonmoon/howl/InboxFragment.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details.
then I get the DexException errors as before. Not sure what to do about it...