亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

錯誤崩潰實現'com.android.support:appcompat-v7:28.0.0'

錯誤崩潰實現'com.android.support:appcompat-v7:28.0.0'

哈士奇WWW 2023-03-31 16:45:57
這是我的依賴項(模塊:應用程序)dependencies {    implementation fileTree(dir: 'libs', include: ['*.jar'])    implementation 'com.android.support:appcompat-v7:28.0.0'    implementation 'com.android.support.constraint:constraint-layout:1.1.3'    testImplementation 'junit:junit:4.12'    androidTestImplementation 'com.android.support.test:runner:1.0.2'    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'    implementation 'com.google.android.gms:play-services:12.0.1'}添加實施 'com.google.android.gms:play-services:12.0.1' 后,同步模塊:應用在實施 'com.android.support:appcompat-v7:28.0.0' 時總是出錯錯誤 :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 <application> element at AndroidManifest.xml:5:5-19:19 to override.
查看完整描述

2 回答

?
拉丁的傳說

TA貢獻1789條經驗 獲得超8個贊

如何通過選擇遷移到 AndroidXRefactor > Migrate to AndroidX并讓重構完成工作

看來你不想遷移到 AndroidX,但你應該試一試,因為 android 支持 28.0.0 是最后一個版本,android 從現在開始只會更新 androidx。

這是 Support Library 28.0.0 的穩定版本,適合在生產環境中使用。這將是 android.support 打包下的最后一個功能版本,鼓勵開發人員遷移到 AndroidX。


查看完整回答
反對 回復 2023-03-31
?
慕碼人8056858

TA貢獻1803條經驗 獲得超6個贊

support library您在一個項目中同時使用兩者androidx library,這就是問題所在。


將支持庫更改為首選的AndroidX庫。


implementation 'androidx.appcompat:appcompat:1.1.0-rc01'

implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'

test?mplementation 'junit:junit:4.13-beta-3'

androidTest?mplementation 'androidx.test:runner:1.3.0-alpha01'

androidTest?mplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha01'

ETC.......


您也可以從 Android Studio 本身遷移到 AndroidX


只需轉到Refactor > Migrate to AndroidX > Migrate

查看完整回答
反對 回復 2023-03-31
  • 2 回答
  • 0 關注
  • 329 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號