我已經(jīng)成功配置了android-P SDK環(huán)境。當(dāng)我嘗試使用android設(shè)計(jì)支持庫(kù)時(shí),我遇到項(xiàng)目構(gòu)建錯(cuò)誤。項(xiàng)目配置為:IDE:3.2 Canary 17目標(biāo)API:28編譯API:28apply plugin: 'com.android.application'apply plugin: 'kotlin-android'apply plugin: 'kotlin-android-extensions'android { compileSdkVersion 28 defaultConfig { applicationId "com.app.navigationpoc" minSdkVersion 21 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(include: ['*.jar'], dir: 'libs') implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'androidx.appcompat:appcompat:1.0.0-alpha3' implementation 'androidx.constraintlayout:constraintlayout:1.1.1' testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test:runner:1.1.0-alpha3' androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha3' implementation 'com.android.support:design:28.0.0-alpha3' implementation 'com.android.support:cardview-v7:28.0.0-alpha3'}而構(gòu)建失敗的錯(cuò)誤是:清單合并失?。篬com.android]中還存在[androidx.core:core:1.0.0-alpha3]中的屬性application @ appComponentFactory value =(androidx.core.app.CoreComponentFactory) .support:support-compat:28.0.0-alpha3] AndroidManifest.xml:22:18-91 value =(android.support.v4.app.CoreComponentFactory)。建議:在AndroidManifest.xml:6:5-40:19的元素上添加'tools:replace =“ android:appComponentFactory”'以進(jìn)行覆蓋。
3 回答

ibeautiful
TA貢獻(xiàn)1993條經(jīng)驗(yàn) 獲得超6個(gè)贊
添加:
tools:replace="android:appComponentFactory"
android:appComponentFactory="whateverString"
到清單應(yīng)用程序
<application
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
tools:replace="android:appComponentFactory"
android:appComponentFactory="whateverString">
希望能幫助到你
- 3 回答
- 0 關(guān)注
- 786 瀏覽
添加回答
舉報(bào)
0/150
提交
取消