Vairāk
Android Materiālu un appcompat Manifesta apvienošana neizdevās
Man ir nākamā klase
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0-rc01'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
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.material:material:1.0.0-rc01'
}
Bet, kad es gribu izveidot lietotni, es saņemu nākamo žurnālu:
Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0-alpha3] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.0.0-alpha3] 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.
Okey! Iet uz manifestu un dari to:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="ru.chopcode.myapplication">
<application
tools:replace="android:appComponentFactory"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
</application>
</manifest>
Tad man Logcat parādās šāda kļūda:
Manifest merger failed with multiple errors, see logs that I have Linked with it
194
3
Vienkārši mainiet "rc01" pirmajā un pēdējā rindā iekšpusē atkarības uz "alpha1"; Man tas darbojas
Vienkārši noņemiet android.support atkarību
Citējot no materiāla vadlīnijām
Šīs atkarības noņemšana darbojas pareizi.
Šeit ir pilns atkarību piemērs
Izveidot jaunu projektu un salīdzināt jūsu build.gradle failus un aizstāts visu
un citas atkarības ar tādām pašām, kādas bija jaunajā projektā kaut kas tāds
Un pēc tam fiksēts imports, lai izmantotu androidx kotlin failos.