在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 問答/HTML/ ionic打包報(bào)錯(cuò) ':app:transformDexWithDexForRe

ionic打包報(bào)錯(cuò) ':app:transformDexWithDexForRelease'

ionic3 安裝了 barcodeScanner 插件之后,打包報(bào)錯(cuò)
Execution failed for task ':app:transformDexWithDexForRelease'.
clipboard.png

執(zhí)行的步驟為:

添加插件

ionic cordova  plugin add phonegap-plugin-barcodescanner --save --variable CAMERA_USAGE_DESCRIPTION="To scan barcodes"

clipboard.png

npm 安裝依賴包

npm install --save @ionic-native/barcode-scanner

clipboard.png

服務(wù)可以正常啟動

clipboard.png

打包的時(shí)候報(bào)錯(cuò)

ionic cordova build android --prod --release 

clipboard.png
文字版報(bào)錯(cuò):

:app:transformDexWithDexForRelease
 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformDexWithDexForRelease'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Landroid/support/v4/app/FragmentTransitionCompat21$1;

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

* Get more help at https://help.gradle.org

BUILD FAILED in 2s
38 actionable tasks: 1 executed, 37 up-to-date
(node:10316) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformDexWithDexForRelease'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files def

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

* Get more help at https://help.gradle.org

BUILD FAILED in 2s

所用的環(huán)境為:

package.json 上面的版本:
"phonegap-plugin-barcodescanner": "^7.1.2",

ionic: 3.20.0
gradle: 4.2



回答
編輯回答
舊言

應(yīng)該是android打包環(huán)境的問題

2017年2月26日 22:03