pmwisdom / meteor-background-geolocation-services

Cordova Background Geolocation For Android and iOS with pure javascript callbacks
12 stars 12 forks source link

Multiple dex files when trying to run on android-device #3

Closed wood-e closed 8 years ago

wood-e commented 8 years ago

When trying to run on android device this error fires off once it's running. Do you what is causing this? I am able to build and run the same app on android before adding this package to the app.

=> Started your app.                          

=> App running at: http://localhost:3000/     
=> Errors executing Cordova commands:         

While running Cordova app for platform Android with options --device:
Error: Command failed: /Users/woody1990/Developer/location_test/.meteor/local/cordova-build/platforms/android/cordova/run --device
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;
at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:579)
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:535)
at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:517)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:164)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:504)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':dexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
/Users/woodington/Library/Android/sdk/build-tools/23.0.2/dx --dex --no-optimize --output /Users/woodington/Developer/woody1990/Developer/location_test/.meteor/local/cordova-build/platforms/android/build/intermediates/dex/debug
--input-list=/Users/woodington/Developer/woody1990/Developer/location_test/.meteor/local/cordova-build/platforms/android/build/intermediates/tmp/dex/debug/inputList.txt
Error Code:
2
Output:

UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;
at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:579)
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:535)
at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:517)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:164)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:504)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

/Users/woodington/Developer/woody1990/Developer/location_test/.meteor/local/cordova-build/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
Error code 1 for command: /Users/woodington/Developer/woody1990/Developer/location_test/.meteor/local/cordova-build/platforms/android/gradlew with args:
cdvBuildDebug,-b,/Users/woodington/Developer/woody1990/Developer/location_test/.meteor/local/cordova-build/platforms/android/build.gradle,-PcdvBuildArch=arm,-Dorg.gradle.daemon=true
at ChildProcess.exitCallback (/tools/utils/processes.js:137:23)
at ChildProcess.emit (events.js:98:17)
at Process.ChildProcess._handle.onexit (child_process.js:820:12)

ExitWithCode:1
wood-e commented 8 years ago

This seems to be because of a particular package I have installed. Not sure which one but will try and narrow down to which one is breaking this.

wood-e commented 8 years ago

Okay not sure what happened but when I removed my plugins and readded them they all worked. Seems to have been a temporary bug but can't seem to see where it came from.