2017-08-30 65 views
0

我试图运行我的IONIC应用程序在我的Android设备运行命令离子cordova运行android - 设备。但是,当它的建筑,科尔多瓦返回该错误IONIC生成失败transformClassesWithDexForDebug

FAILURE: Build failed with an exception. 

* What went wrong: 
Execution failed for task ':transformClassesWithDexForDebug'. 
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException:java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lcom/google/zxing/BarcodeFormat; 

* 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: 51.779 secs 
Error: cmd: Command failed with exit code 1 Error output: 
FAILURE: Build failed with an exception. 

* What went wrong: 
Execution failed for task ':transformClassesWithDexForDebug'. 
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException:java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lcom/google/zxing/BarcodeFormat; 

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

[ERROR] An error occurred while running cordova run android --device (exit code1). 

cordova plugin ls输出:

com.synconset.imagepicker 2.1.8 "ImagePicker" 
cordova-plugin-compat 1.1.0 "Compat" 
cordova-plugin-console 1.0.5 "Console" 
cordova-plugin-device 1.1.4 "Device" 
cordova-plugin-dialogs 1.3.3 "Notification" 
cordova-plugin-facebook4 1.9.1 "Facebook Connect" 
cordova-plugin-geolocation 2.4.3 "Geolocation" 
cordova-plugin-google-analytics 1.8.3 "Google Universal Analytics Plugin" 
cordova-plugin-googleplus 5.1.1 "Google SignIn" 
cordova-plugin-nativestorage 2.2.2 "NativeStorage" 
cordova-plugin-splashscreen 4.0.3 "Splashscreen" 
cordova-plugin-statusbar 2.2.1 "StatusBar" 
cordova-plugin-whitelist 1.3.1 "Whitelist" 
cordova-plugin-x-socialsharing 5.1.8 "SocialSharing" 
es6-promise-plugin 4.1.0 "Promise" 
ionic-plugin-keyboard 2.2.1 "Keyboard" 
phonegap-plugin-barcodescanner 6.0.8 "BarcodeScanner" 
phonegap-plugin-push 1.10.5 "PushPlugin" 
+0

'多DEX文件定义Lcom/google/zxing/BarcodeFormat' - 这表示Google条码库的多个定义,很可能是由科尔多瓦插件。请发布项目中使用的插件列表('cordova plugin ls') – DaveAlden

+0

@DaveAlden我用输出编辑了我的帖子。 –

回答

相关问题