【问题标题】:IONIC APK build errorIONIC APK 构建错误
【发布时间】:2018-10-08 14:56:59
【问题描述】:

我曾尝试在 IONIC 中为 android 构建 apk,但是每次我使用命令进行构建时:ionic cordova build android 它总是会导致 BUILD FAILED。这个错误太笼统了,它只说

DeprecationWarning:不推荐使用未处理的 Promise 拒绝

下图为完整回复:

出了什么问题:任务执行失败 ':app:transformClassesWithMultidexlistForDebug'

请帮帮我。

【问题讨论】:

  • * 出了什么问题:任务 ':app:transformClassesWithMultidexlistForDebug' 执行失败。

标签: ionic-framework


【解决方案1】:

遇到同样的问题,this 解决了我的问题

在platforms/android/build.gradle的末尾添加以下代码

configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
    def requested = details.requested
    if (requested.group == 'com.android.support') {
        if (!requested.name.startsWith("multidex")) {
            details.useVersion '25.3.1'
        }
    }
}
}

希望它也能解决您的问题。

注意:替换你的版本,我的是26.0.0而不是25.3.1

【讨论】:

    猜你喜欢
    • 2018-08-27
    • 1970-01-01
    • 2016-07-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多