Skip to main content

I’m getting this errro: 

Script '../node_modules/@react-native-community/cli-platform-android/native_module
s.gradle' line: 203 * What went wrong:

A problem occurred evaluating project ':app'.

> Could not find method implementation() for arguments tDefaultProjectDependency{identityPath=':intercom_intercom-react-native', configuration
='default'}] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. 

 

Hey Sadab! 👋

Thank you for reporting this issue! This error you're encountering suggests there's an issue with the way the Intercom library is being linked in your project. To resolve this, you should manually link the Intercom library if you're using React Native version 0.59. Here are the steps you should follow:

  • Add the Intercom library to your android/settings.gradle file with the following lines:
      include ':intercom-react-native'
    project(':intercom-react-native').projectDir = new File(rootProject.projectDir, '../node_modules/@intercom/intercom-react-native/android')
  • Then, in your android/app/build.gradle file, inside the dependencies block, add:
      dependencies {
    implementation project(':intercom-react-native')
    }

    Make sure that you're adding these lines correctly and that there are no typos or syntax errors in your Gradle files. If you're using a React Native version below 0.65, be aware that there might be compatibility issues with OkHttp versions, as React Native versions below 0.65 use OkHttp 3, while the Intercom SDK uses OkHttp 4. To prevent compatibility issues, you should add an explicit dependency on okhttp-urlconnection in your app/build.gradle file:
      dependencies {
    implementation("com.squareup.okhttp3:okhttp-urlconnection:4.9.1")
    }
    This should help you resolve the problem you're experiencing with the project evaluation error in Gradle.

More information can be found here: https://developers.intercom.com/installing-intercom/react-native/installation

 

If you still need assistance with this could you please write into us a Support@Intercom.io.

 

Thanks! 


Hey @Shaq Payne 

I’m using RN 0.69.12 and it’s working fine, the issue I’m facing is when I’m trying to update my RN version to 0.74.5

Also I’m not able to send the mail to 
Support@Intercom.io.


Apparently the issue was from our side, we decided to create the RN project from scratch and intercom works fine with it.


Reply