离子3构建失败的任务:processDebugManifest [英] ionic 3 Build failed for task :processDebugManifest
问题描述
我在构建我的离子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:\ Users \ SystemOne \ AppData \ Rooaming \\\
pm \\\
ode_modules)
cli packages: (C:\Users\SystemOne\AppData\Roaming\npm\node_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.
将它放在app模块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屋!