React-native-intercom: Build failed with intercom-android v5.1.6

Created on 14 Nov 2018  路  5Comments  路  Source: tinycreative/react-native-intercom

react-native-intercom depends on io.intercom.android:intercom-sdk-base:5.+. A few hours ago version 5.1.6 of intercom-android was released, including a bump of appCompat-v7 from 27.x to 28. In each android project all dependencies have to be built with the same appCompat version.

It is recommended to use the same versions as RN does, and latest RN is currently using this:

    buildToolsVersion = "27.0.3"
    compileSdkVersion = 27
    supportLibVersion = "27.1.1"

intercom-android should be pinned to v5.1.5 as long as RN still use 27.x as build/compile/supportLib version.

Most helpful comment

My fix.
FIle - android/build.gradle

subprojects {
    afterEvaluate {project ->
        if (project.hasProperty("android")) {
            configurations.all {
                resolutionStrategy.force 'io.intercom.android:intercom-sdk-base:5.1.5'
            }
        }
    }
}

All 5 comments

My fix.
FIle - android/build.gradle

subprojects {
    afterEvaluate {project ->
        if (project.hasProperty("android")) {
            configurations.all {
                resolutionStrategy.force 'io.intercom.android:intercom-sdk-base:5.1.5'
            }
        }
    }
}

@pushpush Man, you just saved my weekend, you're a hero! Thanks a lot!

For expokit, this helped me:
android/build.gradle

subprojects {
    afterEvaluate {project ->
        if (project.hasProperty("android")) {
            configurations.all {
                resolutionStrategy.force 'io.intercom.android:intercom-sdk-base:5.1.5'
                resolutionStrategy.force 'com.android.support:recyclerview-v7:27.1.1'
            }
        }
    }
}

Had to use @pushpush 's workaround but it seems fixed now, removed it and got a green build!

Edit: Ugh, seems like it was only working for the debug build. :(

React-Native 0.58 (currently in RC2) finally bumps to SDK 28: https://github.com/facebook/react-native/commit/8e39451512b6c61e97c44b8c3091d97d62027fec

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aditibarbhai picture aditibarbhai  路  6Comments

felippepuhle picture felippepuhle  路  9Comments

larryranches picture larryranches  路  10Comments

nabilfreeman picture nabilfreeman  路  11Comments

pi-sw picture pi-sw  路  5Comments