1

implementation fileTree(include: ['*.jar'], dir: 'libs')

implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.android.gms:play-services-ads:18.3.0'
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'

//error// 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 element at AndroidManifest.xml:6:5-24:19 to override.

cyrus
  • 19
  • 2
  • Suggestion: add 'tools:replace="android:appComponentFactory"' at AndroidManifext.xml or convert your project to androidx – gautam Dec 31 '19 at 19:54
  • how do i convert to androidx and wha is the cause of problem – cyrus Dec 31 '19 at 19:56
  • On the top menu go to Refactor -> Migrate to Androidx – gautam Dec 31 '19 at 19:58
  • i have added the tool and now im experiencing Merging Errors: Error: tools:replace specified at line:7 for attribute android:appComponentFactory, but no new value specified app main manifest (this file), line 6 Error: Validation failed, exiting app main manifest (this file) – cyrus Dec 31 '19 at 20:26
  • i think this would be helpful :- https://stackoverflow.com/questions/39285678/manifest-merger-error-toolsreplace-not-working/39323808 – gautam Dec 31 '19 at 22:28

0 Answers0