I'm currently facing a build error in my React Native Android project while integrating the @intercom/intercom-react-native package. | Community
Skip to main content
Answered

I'm currently facing a build error in my React Native Android project while integrating the @intercom/intercom-react-native package.


Here are the errors:

 

 

jetified-intercom-sdk-base-15.10.3-runtime.jar: D8: java.lang.NullPointerException: Cannot invoke "String.length()" because "<parameter1>" is null

What Iโ€™ve Tried:

  • Checked build.gradle for SDK version compatibility

  • Cleaned and rebuilt project (./gradlew clean && ./gradlew build)

  • Searched through Intercom docs and changelogs

  • Looked at open issues in the GitHub repo

My Setup:

  • React Native version: 072

  • Intercom SDK version: 15.10.3

     

  • Gradle: 8.0.1

Questions:

  1. Are these methods deprecated or moved to a different namespace?

  2. Is there a recommended way to check login state and fetch user attributes in the latest SDK?

  3. Should I downgrade to a previous version of the Intercom SDK?

Any help is greatly appreciated!

Best answer by Emilygav

Hey โ€‹@Jeet Vani, Emily here from Support Engineering at Intercom ๐Ÿ‘‹๐Ÿผ

 

The error you're seeing, java.lang.NullPointerException: Cannot invoke "String.length()" because "<parameter1>" is null, is likely related to a known issue in the Intercom Android SDK where a parameter (such as composeView) is unexpectedly null. This can cause crashes in methods like addInappNotificationCardToView in the InAppNotificationCardKt class.

To address this:

  • Ensure that the parameter in question is not null before passing it to the method. Adding a null check can help handle this scenario gracefully as a workaround.
  • This issue has been fixed in newer versions of the Intercom Android SDK. Upgrading to at least version 16.2.0 is recommended

If you are using version 15.10.3, updating to the latest SDK version should resolve the crash. If you cannot update immediately, implement a null check as a temporary workaround :)

 

 

View original
Did this topic help you find an answer to your question?

2 replies

Emilygav
Intercom Team
Forum|alt.badge.img+6
  • Intercom Team
  • 124 replies
  • Answer
  • June 13, 2025

Hey โ€‹@Jeet Vani, Emily here from Support Engineering at Intercom ๐Ÿ‘‹๐Ÿผ

 

The error you're seeing, java.lang.NullPointerException: Cannot invoke "String.length()" because "<parameter1>" is null, is likely related to a known issue in the Intercom Android SDK where a parameter (such as composeView) is unexpectedly null. This can cause crashes in methods like addInappNotificationCardToView in the InAppNotificationCardKt class.

To address this:

  • Ensure that the parameter in question is not null before passing it to the method. Adding a null check can help handle this scenario gracefully as a workaround.
  • This issue has been fixed in newer versions of the Intercom Android SDK. Upgrading to at least version 16.2.0 is recommended

If you are using version 15.10.3, updating to the latest SDK version should resolve the crash. If you cannot update immediately, implement a null check as a temporary workaround :)

 

 


  • New Participant
  • 3 replies
  • June 23, 2025

Hello,

I noticed that the React Native library often links to older versions of the Intercom native SDKs for both iOS and Android, which may still include bugs that have already been fixed in more recent releases.

For example, the latest version of intercom-react-native (8.5.0) targets version 15.16.1 for Android and 18.6.1 for iOS. However, I encountered an issue in iOS 18.6.1 that causes the app to freeze when a user closes a post.

To address this, I created a Yarn patch to use 18.7.3 on iOS, which appears to resolve the issue.

My question is:


Is it safe to upgrade (and whatโ€™s the recommended way) to newer native SDK versions manually, even if they aren't officially targeted by the current version of intercom-react-native?

Thank you!


Reply