2017-08-30 24 views
0

私はアンドロイドデバイスでionic cordova run android --deviceコマンドを実行してIONICアプリを実行しようとしています。しかし、その建物、コルドバこのエラーを返します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ファイルをmultiDexEnabled trueを追加Lcom/google/zxing/BarcodeFormatを定義する - これは、Googleバーコードライブラリの複数の定義を示します。おそらく、Cordovaの競合によって引き起こされますプラグイン。あなたのプロジェクトで使用されているプラ​​グインのリストを投稿してください。( 'cordova plugin ls') – DaveAlden

+0

@DaveAlden投稿を編集しました。 –

答えて

0

私は同じ問題とほぼ同じ設定を持っています。 cordova-plugin-facebook4をバージョン1.7.4に戻そうとしましたか?

これは修正ではありませんが、アプリを構築するための回避策です。

プラグインを元に戻しても問題が解決しない場合は、https://github.com/phonegap/phonegap-plugin-barcodescanner/issues/535もご覧ください。プラットフォームへ

関連する問題