loadsmart / rn-salesforce-chat

React Native wrapper for Salesforce SDK chat
MIT License
7 stars 10 forks source link

[šŸ›] Bug/Issue - Build error RN 70 #46

Open oktalk opened 7 months ago

oktalk commented 7 months ago

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):

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

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

Abdelaty commented 4 months ago

any updates? @oktalk

oktalk commented 2 months ago

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

MarlonAEC commented 1 month ago

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