Ho seguito altre tre risorse su questo problema, ma nessuna ha funzionato.Errore Cordova su Build Only per Android: com.android.dex.DexException: più file dex definiscono Landroid/support/annotation/AnimRes;
Il mio iOS si integra perfettamente, ma l'Android fornisce questo errore, non importa quello che cerco di cambiare.
- Già provato a creare un nuovo progetto ma Android mantiene lo stesso problema.
- Tutto Android SDK sono installati
Qui segue l'errore:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':dexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
\t /Users/sakai/Library/Android/sdk/build-tools/23.0.1/dx --dex --no-optimize --output /Users/sakai/mobile/cupomap/platforms/android/build/intermediates/dex/debug --input-list=/Users/sakai/mobile/cupomap/platforms/android/build/intermediates/tmp/dex/debug/inputList.txt
Error Code:
\t 2
Output:
\t
\t UNEXPECTED TOP-LEVEL EXCEPTION:
\t com.android.dex.DexException: Multiple dex files define Landroid/support/annotation/AnimRes;
\t \t at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
\t \t at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
\t \t at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
\t \t at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
\t \t at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
\t \t at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:502)
\t \t at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
\t \t at com.android.dx.command.dexer.Main.run(Main.java:277)
\t \t at com.android.dx.command.dexer.Main.main(Main.java:245)
\t \t at com.android.dx.command.Main.main(Main.java:106)
\t
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 5.343 secs
/Users/sakai/mobile/cupomap/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
Error code 1 for command: /Users/sakai/mobile/cupomap/platforms/android/gradlew with args: cdvBuildDebug,-b,/Users/sakai/mobile/cupomap/platforms/android/build.gradle,-Dorg.gradle.daemon=true
ERROR building one of the platforms: Error: /Users/sakai/mobile/cupomap/platforms/android/cordova/build: Command failed with exit code 8
You may not have the required environment or OS to build this project
Error: /Users/sakai/mobile/cupomap/platforms/android/cordova/build: Command failed with exit code 8
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:139:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:756:16)
at Process.ChildProcess._handle.onexit (child_process.js:823:5)
un sacco di risorse dice che è per lo più un file di supporto duplicato di versioni diverse. Così qui seguire la mia lista Plugin
com.googlemaps.ios 1.9.2 "Google Map iOS SDK for Cordova"
cordova-plugin-console 1.0.1 "Console"
cordova-plugin-device 1.0.1 "Device"
cordova-plugin-device-motion 1.1.1 "Device Motion"
cordova-plugin-device-orientation 1.0.1 "Device Orientation"
cordova-plugin-dialogs 1.1.1 "Notification"
cordova-plugin-geolocation 1.0.1 "Geolocation"
cordova-plugin-splashscreen 2.1.0 "Splashscreen"
cordova-plugin-statusbar 1.0.1 "StatusBar"
cordova-plugin-whitelist 1.0.0 "Whitelist"
phonegap-plugin-push 1.2.2 "PushPlugin"
plugin.google.maps 1.2.9 "phonegap-googlemaps-plugin"
plugin.http.request 1.0.4 "phonegap-http-request"
Ho cercato di risolvere questo per quasi un giorno all'altro.
apprezzo qualsiasi tipo di aiuto
Perfetto @ Henkie14 THAK YOU MOLTO – Sakai
Ha funzionato. Grazie. –
Grazie amico ... ha funzionato. – Tuhin