Skip to main content
Answered

React Native Android builds fail


  • Connector
  • 7 replies

Hey, I'm getting the following build error trying to integrate the React Native SDK with Android builds. iOS builds fine.

 

> Task :app:processDebugResources FAILED
 
FAILURE: Build failed with an exception.
 
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
> Android resource linking failed
ERROR:: AAPT: error: resource style/ThemeOverlay.MaterialComponents.Light.BottomSheetDialog (aka com.example.app/ThemeOverlay.MaterialComponents.Light.BottomSheetDialog) not found.
error: failed linking references.

React Native 0.65.1

Best answer by Ross M11

I wanted to chime in and report that I was experiencing this same exact issue with version 1.1.1 of the package.

 

I resolved it by adding the entry shown below to the styles.xml file at the following path.

android/app/src/main/res/values/styles.xml

Here is the entry (the empty style tag with the name property of "ThemeOverlay.MaterialComponents.Light.BottomSheetDialog")

<resources>
 
// .....
 
<style name="ThemeOverlay.MaterialComponents.Light.BottomSheetDialog">
</style>
 
</resources>

 

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

25 replies

  • New Participant
  • 2 replies
  • August 27, 2021

I'm also experiencing a sudden build fail since today, but with a different error:

> Task :intercom_intercom-react-native:compileReleaseJavaWithJavac FAILED
/home/circleci/App/node_modules/@intercom/intercom-react-native/android/src/main/java/com/intercom/reactnative/IntercomModule.java:17: error: package com.google.firebase.messaging does not exist
import com.google.firebase.messaging.RemoteMessage;
^
/home/circleci/App/node_modules/@intercom/intercom-react-native/android/src/main/java/com/intercom/reactnative/IntercomModule.java:52: error: cannot find symbol
public static boolean isIntercomPush(RemoteMessage remoteMessage) {
^
symbol: class RemoteMessage
location: class IntercomModule
/home/circleci/App/node_modules/@intercom/intercom-react-native/android/src/main/java/com/intercom/reactnative/IntercomModule.java:63: error: cannot find symbol
public static void handleRemotePushMessage(@NonNull Application application, RemoteMessage
^
symbol: class RemoteMessage
location: class IntercomModule
Note: /home/circleci/App/node_modules/@intercom/intercom-react-native/android/src/main/java/com/intercom/reactnative/IntercomModule.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

Ios builds fine, only android is having issues

 


  • Author
  • Connector
  • 7 replies
  • August 27, 2021

I've actually also had that error several times — it seems to be inconsistent for me even if I explicitly add the firebase-messaging dependency, and sometimes retrying a few times gets rid of it...


  • Author
  • Connector
  • 7 replies
  • August 27, 2021

Both issues are related to Intercom dependencies not being installed. This one firebase-messaging, and my issue above is appcompat or material.


  • New Participant
  • 3 replies
  • August 27, 2021

Hey,

We get this also ... seems to be because you left the dependency out of 10.1 SDK.

We use @intercom/intercom-react-native": "^1.0.3" and this has (in its build.gradle) :

dependencies {
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+" // From node_modules
implementation 'io.intercom.android:intercom-sdk:10.+'
}

so the new 10.1 gets pulled in.

To workaround for TODAY, I can change it to 10.0.3 and get 10.0.3, or add

dependencies {
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+" // From node_modules
implementation 'io.intercom.android:intercom-sdk:10.+'
implementation 'com.google.firebase:firebase-messaging:20.2.+'
}

But both of these BREAK my CI/CD pipeline. Please sort it out and push a quick 1.0.4!!!


  • Author
  • Connector
  • 7 replies
  • August 27, 2021

@eric f11​ You selected @jerry​'s answer, but this does not solve the underlying issue of the SDK having incorrect dependencies specified. Intercom has to update the package.


Eric Fitz
Employee
Forum|alt.badge.img+5
  • Employee
  • 1630 replies
  • August 27, 2021

@ray​, I have our mobile engineers looking into this. For now, @jerry​'s is the best available answer for the current situation. Once I receive an update from our mobile engineers, I will update this 👍


  • New Participant
  • 1 reply
  • August 30, 2021

Had a similar issue with the react-native integration for android. Intercom is importing some classes from firebase-messaging but is not adding that as a dependency. Adding it to our app does not seem to resolve the issue, so I had to add it to the module itself, in node_modules, which is a horrible hack. Hopefuly Intercom can fix it asap.


  • New Participant
  • 2 replies
  • September 1, 2021

https://github.com/intercom/intercom-react-native/releases/tag/v1.0.4/p>

 

This release seems to fix the issue for me!


  • Connector
  • 5 replies
  • September 6, 2021

I updated the package to 1.0.5 but I'm getting the same error.

ERROR:: AAPT: error: resource style/ThemeOverlay.MaterialComponents.Light.BottomSheetDialog

 


Eric Fitz
Employee
Forum|alt.badge.img+5
  • Employee
  • 1630 replies
  • September 6, 2021

Hi @user106​, what triggers this error? Do you have any additional crash logs or similar to share here?


  • Author
  • Connector
  • 7 replies
  • September 6, 2021

It's the same error as the original post, building the android app causes it.

The styles from the appcompat/material components dependency are not ending up in the build due to the dependency being missing from the SDK or incompatible with some other part of RN.


  • Connector
  • 5 replies
  • September 7, 2021

Yes, it's the same error as the original post.

The firebase dependency gets fixed by 1.0.4, but I'm still getting this one on material components.


Eric Fitz
Employee
Forum|alt.badge.img+5
  • Employee
  • 1630 replies
  • September 9, 2021

Hey @user106​, @ray​, which version of React Native are you running on your apps?


  • Connector
  • 5 replies
  • September 13, 2021

"react-native": "0.62.0"

Not much, the logs are the same as the original post.

Task :app:processDebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
> Android resource linking failed
ERROR:: AAPT: error: resource style/ThemeOverlay.MaterialComponents.Light.BottomSheetDialog (aka com.example.app/ThemeOverlay.MaterialComponents.Light.BottomSheetDialog) not found.
error: failed linking references.


  • Connector
  • 5 replies
  • September 13, 2021

"react-native": "0.62.0"

Not much, the logs are the same as the original post.

Task :app:processDebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
> Android resource linking failed
ERROR:: AAPT: error: resource style/ThemeOverlay.MaterialComponents.Light.BottomSheetDialog (aka com.example.app/ThemeOverlay.MaterialComponents.Light.BottomSheetDialog) not found.
error: failed linking references.


Eric Fitz
Employee
Forum|alt.badge.img+5
  • Employee
  • 1630 replies
  • September 14, 2021

Can you try clearing the cache from xcframework, delete node_modules and delete package-lock.json?


  • Author
  • Connector
  • 7 replies
  • September 21, 2021

xcframework doesn't affect Android. Regardless clearing node_modules and package-lock doesn't help, this happens on all our developers' systems and CI which does not cache.


  • Author
  • Connector
  • 7 replies
  • September 21, 2021

We're approaching a month now stuck on the same error here. Our subscription isn't feeling like great value right now because the RN integration seems very undercooked, we haven't experienced errors like this on any of our other mobile integrations.


Eric Fitz
Employee
Forum|alt.badge.img+5
  • Employee
  • 1630 replies
  • September 27, 2021

Apologies, @ray​, I can totally appreciate your frustration here. I'm going to message you directly in Intercom and connect you with our Support team to help this get resolved once and for all.


  • New Participant
  • 3 replies
  • Answer
  • November 5, 2021

I wanted to chime in and report that I was experiencing this same exact issue with version 1.1.1 of the package.

 

I resolved it by adding the entry shown below to the styles.xml file at the following path.

android/app/src/main/res/values/styles.xml

Here is the entry (the empty style tag with the name property of "ThemeOverlay.MaterialComponents.Light.BottomSheetDialog")

<resources>
 
// .....
 
<style name="ThemeOverlay.MaterialComponents.Light.BottomSheetDialog">
</style>
 
</resources>

 


  • New Participant
  • 1 reply
  • November 21, 2021

I just uninstalled the old deprecated library and installed this library. But for some reason Android doesn't build. Everytime I rebuild I am also facing the same errors as mentioned above. How is this still not fixed?


  • Author
  • Connector
  • 7 replies
  • November 22, 2021

Intercom messaged me directly about it 2 months ago to "investigate the issue." I followed up a month ago and they still had no update.

 

So yeah, I have no idea what they're doing. It does seem crazy to advertise this integration and have it be broken for three months.


  • New Participant
  • 1 reply
  • December 14, 2021

@eric f11​ this is still breaking android builds as of 1.1.1

 

Can you please escalate this ASAP to your dev team? There's no good workaround now because the old deprecated library and new supported library are both causing build breakages, and the only solution to get our android builds working again is to remove intercom support from our mobile app altogether.


  • New Participant
  • 3 replies
  • December 14, 2021

I had this same issue with 1.1.1 - I fixed it by doing what I mention in my post that is above.


  • New Participant
  • 3 replies
  • December 14, 2021

I had this same issue with 1.1.1 - I fixed it by doing what I mention in my post that is right above @philip v​ 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings