Skip to main content

hi guys, on "@intercom/intercom-react-native": "7.1.1", I can install but I got crash on android like this issue https://community.intercom.com/mobile-sdks-24/android-react-native-app-crash-when-call-intercom-present-7157 
I just saw that we have new version 7.1.2, then I tried and got error. as below

ERROR:/Users/.../.gradle/caches/transforms-3/c8ba025c063d3a20a304d04e63c063d1/transformed/vectordrawable-1.2.0-runtime.jar: D8: java.lang.NullPointerException
ERROR:/Users/.../.gradle/caches/transforms-3/0425b92879a90be481c24e3266c7dff1/transformed/vectordrawable-animated-1.2.0-runtime.jar: D8: java.lang.NullPointerException

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeExtDexDebug'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Failed to transform vectordrawable-animated-1.2.0.aar (androidx.vectordrawable:vectordrawable-animated:1.2.0) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=true, dexing-min-sdk=24, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingNoClasspathTransform: /Users/.../.gradle/caches/transforms-3/0425b92879a90be481c24e3266c7dff1/transformed/vectordrawable-animated-1.2.0-runtime.jar.
         > Error while dexing.
   > Failed to transform vectordrawable-1.2.0.aar (androidx.vectordrawable:vectordrawable:1.2.0) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=true, dexing-min-sdk=24, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for DexingNoClasspathTransform: /Users/.../.gradle/caches/transforms-3/c8ba025c063d3a20a304d04e63c063d1/transformed/vectordrawable-1.2.0-runtime.jar.
         > Error while dexing.

 

Also experiencing the same problem..


Hi Trinh Nguyen and Jack Sopher It’s Mat from the Support Engineering Team 😀
 

It looks like something that our engineers might want to investigate.
Please reach out to us via Messenger in your workspace so we can create a bug report for our Product Team.


Hi Trinh Nguyen and Jack Sopher It’s Mat from the Support Engineering Team 😀
 

It looks like something that our engineers might want to investigate.
Please reach out to us via Messenger in your workspace so we can create a bug report for our Product Team.

hi @mateusz.leszkiewicz where I can find Message in my working space ?
 


 


Trinh Nguyen when you go into your Inbox (the icon on the upper left corner of the screen).

The Messenger icon will appear in the bottom-right corner of the screen.
 

 


Just an update on this issue - in the most recent release of the React Native SDK (7.1.3) we have removed vectordrawable library, which resolves this issue 🎉 

You’ll find info on the latest React Native release here 📌


The error you are encountering seems to be related to issues with the vectordrawable and vectordrawable-animated libraries in your Android project while using the Intercom React Native SDK. Here are some steps you can take to resolve this issue:

1. Update Dependencies

Ensure that all your dependencies are up to date. Sometimes, conflicts arise from mismatched versions of dependencies.

npm install @intercom/intercom-react-native@7.1.2
cd android
./gradlew clean
./gradlew build

2. Update gradle.properties

Ensure your gradle.properties file contains the following lines to use the latest versions of Android Gradle Plugin and Kotlin:

android.useAndroidX=true
android.enableJetifier=true
org.gradle.jvmargs=-Xmx4608m

3. Check build.gradle

In your android/build.gradle and android/app/build.gradle files, ensure you are using compatible versions of the build tools and dependencies:

android/build.gradle:

buildscript {
ext {
buildToolsVersion = "30.0.3"
minSdkVersion = 21
compileSdkVersion = 31
targetSdkVersion = 31
kotlinVersion = "1.5.10"
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:4.2.2")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
}
}

android/app/build.gradle:

android {
compileSdkVersion rootProject.ext.compileSdkVersion

defaultConfig {
applicationId "com.yourapp"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}

4. Clean and Rebuild

Perform a clean and rebuild of your project:

cd android
./gradlew clean
./gradlew build

5. Invalidate Caches/Restart

If you are using Android Studio, you can try invalidating caches and restarting:

  • Go to File > Invalidate Caches / Restart
  • Click Invalidate and Restart

6. Use Compatible Versions

If the above steps do not resolve the issue, try using a previous stable version of the Intercom SDK that you know works, and gradually upgrade your dependencies to identify the conflict.

By following these steps, you should be able to resolve the issue related to the vectordrawable libraries and get your project running with the updated Intercom SDK. If the problem persists, consider reaching out to the Intercom support team or the community for more specific guidance.

Experts opinion

 


Thanks for the reply here @Celvin Pieterson!

 

@Trinh Nguyen @Jack Sopher, as my teammate Bernice mentioned, this should be resolved on the new version.

 

Please do let us know here if you are still experiencing the same issue on v7.1.3.

 


Reply