cawfree / react-native-webassembly

⚛️ 🏎 WebAssembly for React Native powered by JSI.
https://twitter.com/cawfree
MIT License
291 stars 6 forks source link

Build error #12

Open arasrezaei opened 1 year ago

arasrezaei commented 1 year ago
[stderr] 
FAILURE: Build completed with 2 failures.
[stderr] 
1: Task failed with an exception.
[stderr] 
-----------
[stderr] 
* What went wrong:
[stderr] 
Execution failed for task ':app:mergeDebugNativeLibs'.
[stderr] 
> A failure occurred while executing com.android.build.gradle.internal.tasks.MergeNativeLibsTask$MergeNativeLibsTaskWorkAction
[stderr] 
   > 2 files found with path 'lib/arm64-v8a/libjsi.so' from inputs:
[stderr] 
      - /home/expo/workingdir/build/node_modules/react-native-webassembly/android/build/intermediates/library_jni/debug/jni/arm64-v8a/libjsi.so
[stderr] 
      - /home/expo/.gradle/caches/transforms-3/feecb9e4abf81188dc6920cb1e81ac1c/transformed/jetified-react-android-0.71.8-debug/jni/arm64-v8a/libjsi.so
[stderr] 
     If you are using jniLibs and CMake IMPORTED targets, see
[stderr] 
     https://developer.android.com/r/tools/jniLibs-vs-imported-targets
[stderr] 
* Try:
[stderr] 
> Run with --stacktrace option to get the stack trace.
[stderr] 
> Run with --info or --debug option to get more log output.
[stderr] 
> Run with --scan to get full insights.
[stderr] 
==============================================================================
[stderr] 
2: Task failed with an exception.
[stderr] 
-----------
[stderr] 
* What went wrong:
[stderr] 
java.lang.StackOverflowError (no error message)
[stderr] 
* Try:
[stderr] 
> Run with --stacktrace option to get the stack trace.
[stderr] 
> Run with --info or --debug option to get more log output.
[stderr] 
> Run with --scan to get full insights.
[stderr] 
==============================================================================
[stderr] 
* Get more help at https://help.gradle.org
[stderr] 
BUILD FAILED in 11m 46s
parviz-mv commented 1 year ago

Hi ! I also have this error on android side... May be some body know how to fix it?

parviz-mv commented 1 year ago

Hi ! I also have this error on android side... May be some body know how to fix it?

I fixed it after added this code in app/build.gradle the Main React-Native application:

android { packagingOptions { pickFirst '**/*.so' } }

This worked for me)

cawfree commented 10 months ago

@parviz-mv @arasrezaei

Thanks so much for the solution, and apologies for the delay. I wonder if you know if the recommended fix would be possible to implement in the library itself, so that end users don't have to modify their project?