任务的离子3构建失败:processDebugManifest [英] ionic 3 Build failed for task :processDebugManifest

查看:9
本文介绍了任务的离子3构建失败:processDebugManifest的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在构建我的 ionic 3 应用程序时遇到了问题.每次我尝试构建 android 应用程序时都会出现以下错误.

I am having trouble in building my ionic 3 app. Every time I try to build the android app it gives the following error.

* What went wrong:
Execution failed for task ':processDebugManifest'.
> Manifest merger failed : Attribute meta-data#android.support.VERSION@value val
ue=(25.3.1) from [com.android.support:appcompat-v7:25.3.1] AndroidManifest.xml:2
7:9-31
        is also present at [com.android.support:support-v4:26.0.0-alpha1] Androi
dManifest.xml:27:9-38 value=(26.0.0-alpha1).
        Suggestion: add 'tools:replace="android:value"' to <meta-data> element a
t AndroidManifest.xml:25:5-27:34 to override.

我的离子信息如下:

cli 包:(C:UsersSystemOneAppDataRoaming pm ode_modules)

cli packages: (C:UsersSystemOneAppDataRoaming pm ode_modules)

@ionic/cli-utils  : 1.18.0
ionic (Ionic CLI) : 3.18.0

全局包:

cordova (Cordova CLI) : 6.5.0

本地包:

@ionic/app-scripts : 3.0.0
Cordova Platforms  : none
Ionic Framework    : ionic-angular 3.7.1

系统:

Node : v6.10.0
npm  : 3.10.10
OS   : Windows 7

环境变量:

ANDROID_HOME : not set

杂项:

backend : legacy

任何帮助将不胜感激

推荐答案

您的 Android 构建正在尝试支持多个版本,请注意这部分:[com.android.support:appcompat-v7:25.3.1] - 这是它试图支持的旧版本.

Your Android build is attempting to support multiple versions, take note of this part: [com.android.support:appcompat-v7:25.3.1] - this is the older version that it is trying to support.

把它放在你的应用模块 build.gradle 的末尾(在你的项目文件夹中):

Put this at the end of your app module build.gradle(in your project folder):

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'
            }
        }
    }
}

确保将 details.useVersion 替换为旧版本号.

Make sure to replace the details.useVersion with the older version number.

这篇关于任务的离子3构建失败:processDebugManifest的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆