ionic3 ionic cordova build android --prod 打包报错,如何处理Gradle 5.0

拾光过客
  • 605

报错关键代码信息如下:
貌似主要是 Gradle 5.0 这个东西,该如何处理呢?

[14:17:24]  lint finished in 5.73 s
Subproject Path: CordovaLib
Subproject Path: app
publishNonDefault is deprecated and has no effect anymore. All variants are now
published.
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' in
stead.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be re
moved in Gradle 5.0. Please use Task.doLast(Action) instead.
        at build_awo1ahul3j8zm40njgaa4kho7.run(E:\Ionic3Demo\zh\platforms\androi
d\app\build.gradle:144)

.
.
.
省
略
.
.
.
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForD
ebug'.
> java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.de
xing.DexArchiveMergerException: Unable to merge dex

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
回复
阅读 4.5k
2 个回答

我也遇到这个问题,请问解决了吗

Jean_hl
  • 1
新手上路,请多包涵

请问你们解决这个问题了么,我也碰到了··

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
宣传栏