airbnb / epoxy

Epoxy is an Android library for building complex screens in a RecyclerView
https://goo.gl/eIK82p
Apache License 2.0
8.52k stars 728 forks source link

Manifest merger failed with multiple errors #666

Open hdtuan87 opened 5 years ago

hdtuan87 commented 5 years ago

my app gradle:

apply plugin: 'kotlin-kapt'

dependencies{
//epoxy
implementation 'com.airbnb.android:epoxy:3.1.0'
annotationProcessor 'com.airbnb.android:epoxy-processor:3.1.0'
}

error:

Caused by: java.lang.RuntimeException: Manifest merger failed with multiple errors, see logs at com.android.builder.core.AndroidBuilder.mergeManifestsForApplication(AndroidBuilder.java:540) at com.android.build.gradle.tasks.MergeManifests.doFullTaskAction(MergeManifests.java:173) at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:106) at sun.reflect.GeneratedMethodAccessor2235.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73) at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:50) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:131) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292) at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174) at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90) at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:120) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:99) ... 34 more

elihart commented 5 years ago

Can you give more information - how do you know this is epoxy's fault? have you tried different versions? what are the specific manifest errors in the logs?

hdtuan87 commented 5 years ago

I got this error when I added the epoxy library to the project. I use the version 3.1.0. The above is the error I received. it is not just about a specific manifest file at all.

elihart commented 5 years ago

Manifest merger failed with multiple errors, see logs - can you give information from the logs?

without more information there's not much I can do

budioktaviyan commented 5 years ago

I also got this issue

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 <application> element at AndroidManifest.xml:8:5-47:19 to override.
arnorhs commented 5 years ago

I'm seeing the same thing when trying to add Epoxy to an existing project, and my log says:

    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 <application> element at AndroidManifest.xml:34:5-118:19 to override.

it seems like androidx.xx dependencies shouldn't be included .. so does Epoxy require the androidx variant of the support libs?

elihart commented 5 years ago

@arnorhs @budioktaviyan Epoxy 3.0.0+ uses Androidx - if you don't use Androidx you can use an older version of Epoxy

BunsinNANH commented 5 years ago

my app gradle: dependencies { classpath 'com.android.tools.build:gradle:3.0.1' classpath 'com.google.gms:google-services:3.0.0' classpath 'com.android.tools.build:gradle:3.4.0'

my issue:

Execution failed for task ':app:processDebugManifest'.

Manifest merger failed with multiple errors, see logs

How I can solve it please give me some idea

ashishpatel1512 commented 5 years ago

i am getting this error.

Error:Execution failed for task ':app:processDebugManifest'.

Manifest merger failed with multiple errors, see logs

can some help me out.? thanks in advanced.

here is my manifest file.

<?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="in.lszendriveapplication.com">

<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />

<uses-feature
    android:name="android.hardware.location.gps"
    android:required="true" />
<uses-feature
    android:name="android.hardware.location.network"
    android:required="true" />

<application
    android:name="in.lszendriveapplication.com.LetsServiceApp"
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:largeHeap="true"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:usesCleartextTraffic="true"
    android:networkSecurityConfig="@xml/network_security_config"
    android:targetSandboxVersion="1"
    android:supportsRtl="true"
    android:theme="@style/AppTheme"
    tools:replace="android:appComponentFactory">

    <meta-data
        android:name="com.google.android.geo.API_KEY"
        android:value="AIzaSyBCEk3vVJuNQ1FCanH95N0oryq-HNJFFsA" />

    <meta-data android:name="com.here.android.maps.appid" android:value="mHgbhAvbUSpLuIUdROCW"/>
    <meta-data android:name="com.here.android.maps.apptoken" android:value="2LPK6QnP5pg9M3MQwNPWgA"/>
    <meta-data
        android:name="com.here.android.maps.license.key"
        android:value="bsNRRcCfiIx8Hn2EJvklpu9N1c15bdQtqeUbM5H0n4GJQGGw8mBwqSdITi/z7R32vHnth0DqmQDdLJctDUK6n1tIBCO0S7FOVu+yF6gXDoBPhcsy2Q7orHiKWXIlQ0t5n0tj9OH5XCJVrpzF3EByLylpxst1roevyaSzvqLYZTtFyZXUIr8YbwnJYGp5Ggg24DwlNYIylNzMRVTiKkbRM02ekJYmQKyJwxV8aSqGDR8cOI70w5Cy8FK1J5J+psJPiszN54h6Wcer/vxGFQ384ABtgPI39Wish4giWWaZp9S1XA8b8Z2LtDFF2L+yOe2Epqi42O9cH0nApvQcxlQxXs7FVDADFsY1hmetK7uswGsAqW8mWp75c/upAXkPld4G6ZPV3ASMyik7cEpdbv0Qhdzdd47dpF0DatHB/wqr3DBPbOoPwsIoVS+rrVPNtnOkWObFOrbWQU/tvfxUcDdWc/JHS1rB+twW/BT0331rf4oy3XQeSR/uuL0fD/a9pviY1ylUE3yiREDUtPJheOHMuyG7aTSd92gOzOOq90aQMShyP3rCwRE8guxpiovhpu3c3AwY8xVe9bLHRQGdQ9pZv852gb9UkUdot2dKGgbMhCo73b1FlbCHpN9OV6+i3OlfEvK1YosTGI1X2djF6Msn4/IvWzLUPlieAwomsXMTKlA=" />

    <!--Developers should always provide custom values for each of {YOUR_LABEL_NAME} and {YOUR_INTENT_NAME}.
     Do not reuse HERE SDK defaults.-->
    <meta-data
        android:name="INTENT_NAME"
        android:value="Navigation" />

    <activity android:name="in.lszendriveapplication.com.zendrive.activities.SplashActivity"
        android:screenOrientation="portrait">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name="in.lszendriveapplication.com.zendrive.activities.NewStartRideActivity"
        android:screenOrientation="portrait" />
    <activity
        android:name="in.lszendriveapplication.com.zendrive.activities.TripDetailsActivity"
        android:screenOrientation="portrait" />
    <activity
        android:name="in.lszendriveapplication.com.zendrive.activities.MapActivity"
        android:screenOrientation="portrait" />
    <activity
        android:name="in.lszendriveapplication.com.zendrive.activities.TripListActivity"
        android:screenOrientation="portrait" />
    <activity
        android:name="in.lszendriveapplication.com.place_search.LocationSearchActivity"
        android:screenOrientation="portrait" />

    <activity
        android:name="in.lszendriveapplication.com.zendrive.activities.SpeedMediatorActivity"
        android:screenOrientation="portrait" />

    <activity
        android:name="in.lszendriveapplication.com.zendrive.activities.ActivityIntroduction"
        android:screenOrientation="portrait" />

    <activity
        android:name="in.lszendriveapplication.com.user_authentication.LoginActivity"
        android:screenOrientation="portrait" />

    <activity android:name="in.lszendriveapplication.com.zendrive.activities.NewTripListActivity"
        android:screenOrientation="portrait" />

    <activity android:name=".place_search.PlacesSearchActivity"
        android:screenOrientation="portrait" />

    <receiver android:name="in.lszendriveapplication.com.zendrive.ZendriveSdkBroadcastReceiver" />
    <service android:name="in.lszendriveapplication.com.zendrive.SpeedMeter.GpsServices" />

    <uses-library
        android:name="com.google.android.maps"
        android:required="true" /> <!-- TODO: Add your maps api key here -->

    <receiver android:name="in.lszendriveapplication.com.zendrive.BootReceiver">
        <intent-filter>
            <action android:name="android.intent.action.BOOT_COMPLETED" />

            <category android:name="android.intent.category.HOME" />
        </intent-filter>
        <intent-filter>
            <action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
        </intent-filter>
    </receiver>

    <service
        android:name="com.here.android.mpa.service.MapService"
        android:label="Navigation"
        android:exported="false">
        <intent-filter>
            <action android:name="Navigation">
            </action>
        </intent-filter>
    </service>
    <!-- HERE Positioning Service definition. -->
    <service
        android:name="com.here.services.internal.LocationService"
        android:enabled="true"
        android:exported="false"
        android:process=":remote">
    </service>
</application>

Here is my gradle build.

apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

android { compileSdkVersion 28 buildToolsVersion '28.0.3' defaultConfig { applicationId "in.lszendriveapplication.com" minSdkVersion 19 targetSdkVersion 28 multiDexEnabled true versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true vectorDrawables.useSupportLibrary = true } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } dexOptions { javaMaxHeapSize "4g" //specify the heap size for the dex process preDexLibraries = false //delete the already predexed libraries } lintOptions { // This is needed to avoid spurious lint errors from libthrift on android. disable 'InvalidPackage' abortOnError false } packagingOptions { exclude 'META-INF/LICENSE.txt' exclude 'META-INF/NOTICE.txt' } dataBinding { enabled true } repositories { flatDir { dirs 'libs' } mavenCentral() google() } packagingOptions{ doNotStrip '/mips/.so' doNotStrip '/mips64/.so' } }

dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation"org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" //noinspection GradleCompatible implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support.constraint:constraint-layout:1.1.3' 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(name:'HERE-sdk', ext:'aar')
implementation 'org.locationtech.jts:jts-core:1.15.0'
implementation 'com.google.code.gson:gson:2.8.5'

implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'

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

implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'com.squareup.okhttp3:okhttp:3.12.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.11.0'
implementation 'com.ncorti:slidetoact:0.6.0'

implementation 'com.google.android.gms:play-services-places:17.0.0'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.google.android.gms:play-services-auth:17.0.0'

implementation 'com.android.support:multidex:1.0.3'
implementation 'com.zendrive.sdk.android:ZendriveSDK:5.6.3'

implementation 'com.mikhaellopez:circularimageview:3.0.2'
implementation 'com.github.blackfizz:eazegraph:1.2.5l@aar'
implementation('com.wdullaer:materialdatetimepicker:3.6.3') {
    exclude group: 'com.android.support', module: 'support'
    exclude group: 'com.android.support', module: 'design'
    exclude group: 'com.android.support', module: 'appcompat'
    exclude group: 'com.android.support', module: 'support-v13'
    exclude group: 'com.android.support', module: 'cardview'
}
implementation 'joda-time:joda-time:2.9.2'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.+'

implementation 'io.realm:realm-android:0.87.5'
annotationProcessor 'io.realm:realm-android:0.87.5'

}

DrMkcTheHandSome commented 5 years ago

I NEED SOME HELP I ALSO HAVE THE SAME PROBLEM WITH YOU GUYS. HOW CAN WE SOLVE THIS ?

vuongquocthanh commented 5 years ago

Convert to androidx -> solved

ifjgm005 commented 4 years ago

when I add dependence like this "compile 'cat.ereza:customactivityoncrash:2.3.0'". This library allows launching a custom activity when the app crashes, instead of showing the hated "Unfortunately, X has stopped" dialog.then I got the same error. solved steps: 1: compile 'cat.ereza:customactivityoncrash:1.5.0' 2: solved 3: compile 'cat.ereza:customactivityoncrash:2.3.0 4: the error gone

I don't know why!!!