Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

[🐛] Bug/Issue - Build error RN 70 #46

Open
oktalk opened this issue Jan 22, 2024 · 3 comments
Open

[🐛] Bug/Issue - Build error RN 70 #46

oktalk opened this issue Jan 22, 2024 · 3 comments

Comments

@oktalk
Copy link

oktalk commented Jan 22, 2024

Describe the issue
I'm building a new app with forcereact. In this app the react-native version is up to 70. My guess is the repo rn-salesforce-chat doesn't work with RN 70 as my build fails every time I try to build for Android. However, I can successfully build in iOS. I'm not sure why the Android build is failing as the errors are circular and not descriptive.

Here are the steps I've taken and the errors I got:

Install package according to readme file

• Install rn-salesforce-chat and modify build.gradle file with:

    maven {
      url 'https://s3.amazonaws.com/salesforcesos.com/android/maven/release'
    }

Error:

* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable
   > Resource compilation failed (Failed to compile values resource file /Users/oktalk/Development/projects/Company/Company-Mobile/test-projects/TestCompanyMobile/android/app/build/intermediates/incremental/debug/mergeDebugResources/merged.dir/values/values.xml. Cause: java.lang.IllegalStateException: Can not add resource (com.android.aaptcompiler.ParsedResource@1d4118bb) to table.). Check logs for more details.

Install package with manual linking

• Install rn-salesforce-chat and follow the manual install instructions (I even tried to this method but got the same error).

Same errors still persist if I do the rest of the manual Android install.

To Reproduce
Steps to reproduce the behavior:

  1. Generate new project with https://www.npmjs.com/package/forcereact
  2. Install rn-salesforce-chat
  3. Build with npx react-native run-android

Expected behavior
Expect app to build in Android.

Smartphone (please complete the following information):

  • Device: Pixel 5 API 31
  • OS:

rn-salesforce-chat version (please complete the following information):

  • Version: 3.4.1

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
System:
OS: macOS 13.6.1
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Memory: 228.36 MB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.16.0 -
Yarn: 1.22.21 -
npm: 9.5.1 - ~/.nvm/versions/node/v18.16.0/bin/npm
Watchman: 2023.12.04.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.12.1
SDKs:
iOS SDK:
Platforms: DriverKit 22.1, iOS 16.1, macOS 13.0, tvOS 16.1, watchOS 9.1
IDEs:
Android Studio: 2022.3 AI-223.8836.35.2231.10811636
Xcode: 14.1/14B47b - /usr/bin/xcodebuild
Languages:
Java: 11.0.21 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.1.0 => 18.1.0
react-native: 0.70.14 => 0.70.14
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

@oktalk oktalk changed the title [🐛] Bug/Issue Report Title - Build error RN 70 [🐛] Bug/Issue - Build error RN 70 Jan 22, 2024
@Abdelaty
Copy link

Abdelaty commented Apr 7, 2024

any updates? @oktalk

@oktalk
Copy link
Author

oktalk commented Jun 26, 2024

My best guess is, the issue is caused by this package not working with Gradle 8.

@MarlonAEC
Copy link

MarlonAEC commented Jul 2, 2024

I have this library installed and it's working fine for RN >= 0.70 maybe is something related to the location you have the project looking to this threads on SO:

  1. https://stackoverflow.com/questions/75603686/can-not-add-resource-com-android-aaptcompiler-parsedresource4ba9af2
  2. https://stackoverflow.com/questions/23359572/android-studio-execution-failed-for-task-appmergedebugresources-if-projec
    check if those links help otherwise I will need more info about the issue to be able to help you
    @oktalk @Abdelaty

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants