我已經成功配置了android-P SDK環境。當我嘗試使用android設計支持庫時,我遇到項目構建錯誤。項目配置為:IDE:3.2 Canary 17目標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'}而構建失敗的錯誤是:清單合并失?。篬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”'以進行覆蓋。
3 回答

ibeautiful
TA貢獻1993條經驗 獲得超6個贊
添加:
tools:replace="android:appComponentFactory"
android:appComponentFactory="whateverString"
到清單應用程序
<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 關注
- 772 瀏覽
添加回答
舉報
0/150
提交
取消