Tag Archives: butterknife error

Execution failed for task ‘:app:processDebugManifest’

Import packages butterknife package appear [androidx. Core: the core: 1.0.0] AndroidManifest. XML: make haste – 86 value = (androidx. Core. App. CoreComponentFactory)

Butterknife package latest address: https://github.com/JakeWharton/butterknife
implementation ‘com. Jakewharton: butterknife: 10.0.0’
annotationProcessor ‘com. Jakewharton: butterknife – compiler: 10.0.0’

Error details
Manifest merger failed : Attribute application @ appComponentFactory value = (. Android support. The v4. App. CoreComponentFactory) from [com. Android. Support: support – compat: 28.0.0] AndroidManifest. XML: make haste – 91
is also present at [androidx. Core: the core: 1.0.0] AndroidManifest. XML: value = “- 86 (androidx. Core. App. CoreComponentFactory).
the Suggestion: Add ‘tools: replace = “android: appComponentFactory” element to the at AndroidManifest. XML: 5:5 – the sons to override.

Solution 1: Add useAndroidX and enableJetifier as shown in the figure

android.useAndroidX=true
android.enableJetifier=true

Note:
this method does not need to add the classpath ‘com. Jakewharton: butterknife – gradle – plugin: 10.0.0’
but will import android. Support. V7. App. AppCompatActivity modified into import androidx. Appcompat. App. AppCompatActivity
is also all references Androidx package

Solution 2: Use the lower version of the package directly, as shown in the figure
Delete the build.Gradle plug-in at the top of the module, either one of the two below

apply plugin: ‘com.neenbedankt.android-apt’
apply plugin: ‘android-apt

The dependency in build.gradle under module is changed to :(only these two are needed)
// butterknife component injection

implementation'com.jakewharton:butterknife:8.6.0'
annotationProcessor'com.jakewharton:butterknife-compiler:8.6.0'

Note: the use of android package or the original
import android. Support. V7. App. AppCompatActivity