![](/img/trans.png)
[英]java.lang.RuntimeException: Manifest merger failed with multiple errors,
[英]java.lang.RuntimeException: Manifest merger failed
構建項目時出現此代碼錯誤。 我的gradle構建同步成功完成。
我已經搜索了此錯誤,但沒有任何效果。 我還研究了stackoverflow。
java.lang.RuntimeException: Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to
這是我的畢業代碼:-
android {
compileSdkVersion 28
defaultConfig {
applicationId "stechrey.rwdbiharemail"
minSdkVersion 14
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.android.gms:play-services-ads:18.1.1'
implementation 'com.android.support:design:28.0.0'
implementation 'junit:junit:4.12'
implementation "com.wdullaer:materialdatetimepicker:3.6.4"
}
apply plugin: 'com.google.gms.google-services'
類路徑:
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.google.gms:google-services:4.3.0'
我希望輸出成功,但是實際輸出是錯誤的。 我是編程新手。 請幫我。
引發此錯誤是因為您的庫之一已在androidX中編碼,並且您正在使用28個支持庫。 可能由於此原因導致不匹配。請嘗試使用此類庫的舊版本或將項目遷移到androidx
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.