Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build when using Android flavours #4537

Closed
konstantindt opened this issue Jun 6, 2023 · 42 comments
Closed

Cannot build when using Android flavours #4537

konstantindt opened this issue Jun 6, 2023 · 42 comments
Labels
Needs review Issue is ready to be reviewed by a maintainer Platform: Android This issue is specific to Android Repro provided A reproduction with a snippet of code, snack or repo is provided

Comments

@konstantindt
Copy link

Description

When using Android flavours running into blocking build issues e.g.

  1. No variants found for XXX
  2. Task :react-native-reanimated:configureCMakeDebug[arm64-v8a] FAILED ... java.lang.StackOverflowError (no error message)

I can reproduce 1 in the Example project - konstantindt@a08bb9d - which I when pass to Android Studio "Import Project (Gradle, Eclipse ADT, etc.)" the importing fails:

No variants found for ':react-native-box2d'. Check build files to ensure at least one variant exists. at:
com.android.tools.idea.gradle.project.sync.AndroidModule.prepare(GradleModules.kt:266)
...

Screenshot 2023-06-06 at 15 41 08

About Android Studio:

Android Studio Flamingo | 2022.2.1
Build #AI-222.4459.24.2221.9862592, built on March 31, 2023
Runtime version: 17.0.6+0-17.0.6b802.4-9586694 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 13.4
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 10
Metal Rendering is ON
Registry:
    external.system.auto.import.disabled=true
    ide.text.editor.with.preview.show.floating.toolbar=false
    gradle.version.catalogs.dynamic.support=true

Steps to reproduce

  1. cd path/to/react-native-projects
  2. gh repo clone konstantindt/react-native-reanimated
  3. cd react-native-reanimated
  4. yarn install
  5. cd Example
  6. yarn install
  7. Open Android Studio -> Projects -> "Import Project (Gradle, Eclipse ADT, etc.)"
  8. Open path/to/react-native-projects/react-native-reanimated/Example/android

Snack or a link to a repository

https://github.com/konstantindt/react-native-reanimated

Reanimated version

3.2.0

React Native version

0.72.0-rc.3

Platforms

Android

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

Paper (Old Architecture)

Build type

None

Device

None

Device model

No response

Acknowledgements

Yes

@konstantindt konstantindt added the Needs review Issue is ready to be reviewed by a maintainer label Jun 6, 2023
@github-actions github-actions bot added Platform: Android This issue is specific to Android Repro provided A reproduction with a snippet of code, snack or repo is provided labels Jun 6, 2023
@naftalibeder
Copy link
Contributor

naftalibeder commented Jun 7, 2023

I'm also experiencing the build error

Task :react-native-reanimated:configureCMakeDebug[arm64-v8a] FAILED

on 3.2.0. (The build works on 2.17.0, but fails on all 3.x versions.)

Relevant debug logs:

Details Starting process 'command '/Users/admin/code/app/node_modules/react-native-reanimated/android/build/intermediates/cxx/RelWithDebInfo/2u516l44/logs/arm64-v8a/prefab_command''. Working directory: /Users/admin/code/app/node_modules/react-native-reanimated/android Command: /Users/admin/code/app/node_modules/react-native-reanimated/android/build/intermediates/cxx/RelWithDebInfo/2u516l44/logs/arm64-v8a/prefab_command Successfully started process 'command '/Users/admin/code/app/node_modules/react-native-reanimated/android/build/intermediates/cxx/RelWithDebInfo/2u516l44/logs/arm64-v8a/prefab_command'' C/C++: /Users/admin/code/app/node_modules/react-native-reanimated/android/CMakeLists.txt release|arm64-v8a : removing stale contents from '/Users/admin/code/app/node_modules/react-native-reanimated/android/.cxx/RelWithDebInfo/2u516l44/arm64-v8a' C/C++: /Users/admin/code/app/node_modules/react-native-reanimated/android/CMakeLists.txt release|arm64-v8a : created folder '/Users/admin/code/app/node_modules/react-native-reanimated/android/.cxx/RelWithDebInfo/2u516l44/arm64-v8a' C/C++: /Users/admin/code/app/node_modules/react-native-reanimated/android/CMakeLists.txt release|arm64-v8a : executing cmake /Users/admin/Library/Android/sdk/cmake/3.18.1/bin/cmake \ -H/Users/admin/code/app/node_modules/react-native-reanimated/android \ -DCMAKE_SYSTEM_NAME=Android \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ -DCMAKE_SYSTEM_VERSION=26 \ -DANDROID_PLATFORM=android-26 \ -DANDROID_ABI=arm64-v8a \ -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a \ -DANDROID_NDK=/Users/admin/Library/Android/sdk/ndk/23.1.7779620 \ -DCMAKE_ANDROID_NDK=/Users/admin/Library/Android/sdk/ndk/23.1.7779620 \ -DCMAKE_TOOLCHAIN_FILE=/Users/admin/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android.toolchain.cmake \ -DCMAKE_MAKE_PROGRAM=/Users/admin/Library/Android/sdk/cmake/3.18.1/bin/ninja \ -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/admin/code/app/node_modules/react-native-reanimated/android/build/intermediates/cxx/RelWithDebInfo/2u516l44/obj/arm64-v8a \ -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/Users/admin/code/app/node_modules/react-native-reanimated/android/build/intermediates/cxx/RelWithDebInfo/2u516l44/obj/arm64-v8a \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_FIND_ROOT_PATH=/Users/admin/code/app/node_modules/react-native-reanimated/android/.cxx/RelWithDebInfo/2u516l44/prefab/arm64-v8a/prefab \ -B/Users/admin/code/app/node_modules/react-native-reanimated/android/.cxx/RelWithDebInfo/2u516l44/arm64-v8a \ -GNinja \ -DANDROID_STL=c++_shared \ -DREACT_NATIVE_MINOR_VERSION=71 \ -DANDROID_TOOLCHAIN=clang \ -DREACT_NATIVE_DIR=/Users/admin/code/app/node_modules/react-native \ -DJS_RUNTIME=hermes \ -DJS_RUNTIME_DIR=/Users/admin/code/app/node_modules/react-native/sdks/hermes \ -DCLIENT_SIDE_BUILD=true \ -DIS_NEW_ARCHITECTURE_ENABLED=false \ -DIS_REANIMATED_EXAMPLE_APP=false \ -DPLAYGROUND_APP_NAME=app \ -DREANIMATED_PACKAGE_BUILD=null \ -DREANIMATED_VERSION=3.2.0 \ -DHERMES_ENABLE_DEBUGGER=0

C/C++: /Users/admin/code/app/node_modules/react-native-reanimated/android/CMakeLists.txt release|arm64-v8a : /Users/admin/Library/Android/sdk/cmake/3.18.1/bin/cmake
-H/Users/admin/code/app/node_modules/react-native-reanimated/android
-DCMAKE_SYSTEM_NAME=Android
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON
-DCMAKE_SYSTEM_VERSION=26
-DANDROID_PLATFORM=android-26
-DANDROID_ABI=arm64-v8a
-DCMAKE_ANDROID_ARCH_ABI=arm64-v8a
-DANDROID_NDK=/Users/admin/Library/Android/sdk/ndk/23.1.7779620
-DCMAKE_ANDROID_NDK=/Users/admin/Library/Android/sdk/ndk/23.1.7779620
-DCMAKE_TOOLCHAIN_FILE=/Users/admin/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android.toolchain.cmake
-DCMAKE_MAKE_PROGRAM=/Users/admin/Library/Android/sdk/cmake/3.18.1/bin/ninja
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/admin/code/app/node_modules/react-native-reanimated/android/build/intermediates/cxx/RelWithDebInfo/2u516l44/obj/arm64-v8a
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/Users/admin/code/app/node_modules/react-native-reanimated/android/build/intermediates/cxx/RelWithDebInfo/2u516l44/obj/arm64-v8a
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DCMAKE_FIND_ROOT_PATH=/Users/admin/code/app/node_modules/react-native-reanimated/android/.cxx/RelWithDebInfo/2u516l44/prefab/arm64-v8a/prefab
-B/Users/admin/code/app/node_modules/react-native-reanimated/android/.cxx/RelWithDebInfo/2u516l44/arm64-v8a
-GNinja
-DANDROID_STL=c++_shared
-DREACT_NATIVE_MINOR_VERSION=71
-DANDROID_TOOLCHAIN=clang
-DREACT_NATIVE_DIR=/Users/admin/code/app/node_modules/react-native
-DJS_RUNTIME=hermes
-DJS_RUNTIME_DIR=/Users/admin/code/app/node_modules/react-native/sdks/hermes
-DCLIENT_SIDE_BUILD=true
-DIS_NEW_ARCHITECTURE_ENABLED=false
-DIS_REANIMATED_EXAMPLE_APP=false
-DPLAYGROUND_APP_NAME=app
-DREANIMATED_PACKAGE_BUILD=null
-DREANIMATED_VERSION=3.2.0
-DHERMES_ENABLE_DEBUGGER=0

Starting process 'command '/Users/admin/Library/Android/sdk/cmake/3.18.1/bin/cmake''. Working directory: /Users/admin/code/app/node_modules/react-native-reanimated/android Command: /Users/admin/Library/Android/sdk/cmake/3.18.1/bin/cmake -H/Users/admin/code/app/node_modules/react-native-reanimated/android -DCMAKE_SYSTEM_NAME=Android -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_SYSTEM_VERSION=26 -DANDROID_PLATFORM=android-26 -DANDROID_ABI=arm64-v8a -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a -DANDROID_NDK=/Users/admin/Library/Android/sdk/ndk/23.1.7779620 -DCMAKE_ANDROID_NDK=/Users/admin/Library/Android/sdk/ndk/23.1.7779620 -DCMAKE_TOOLCHAIN_FILE=/Users/admin/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=/Users/admin/Library/Android/sdk/cmake/3.18.1/bin/ninja -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/admin/code/app/node_modules/react-native-reanimated/android/build/intermediates/cxx/RelWithDebInfo/2u516l44/obj/arm64-v8a -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/Users/admin/code/app/node_modules/react-native-reanimated/android/build/intermediates/cxx/RelWithDebInfo/2u516l44/obj/arm64-v8a -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_FIND_ROOT_PATH=/Users/admin/code/app/node_modules/react-native-reanimated/android/.cxx/RelWithDebInfo/2u516l44/prefab/arm64-v8a/prefab -B/Users/admin/code/app/node_modules/react-native-reanimated/android/.cxx/RelWithDebInfo/2u516l44/arm64-v8a -GNinja -DANDROID_STL=c++_shared -DREACT_NATIVE_MINOR_VERSION=71 -DANDROID_TOOLCHAIN=clang -DREACT_NATIVE_DIR=/Users/admin/code/app/node_modules/react-native -DJS_RUNTIME=hermes -DJS_RUNTIME_DIR=/Users/admin/code/app/node_modules/react-native/sdks/hermes -DCLIENT_SIDE_BUILD=true -DIS_NEW_ARCHITECTURE_ENABLED=false -DIS_REANIMATED_EXAMPLE_APP=false -DPLAYGROUND_APP_NAME=app -DREANIMATED_PACKAGE_BUILD=null -DREANIMATED_VERSION=3.2.0 -DHERMES_ENABLE_DEBUGGER=0
C/C++: /Users/admin/code/app/node_modules/react-native-reanimated/android/CMakeLists.txt release|arm64-v8a : JSON generation completed with problem. Exception: org.gradle.process.internal.ExecException: A problem occurred starting process 'command '/Users/admin/Library/Android/sdk/cmake/3.18.1/bin/cmake''
C/C++: /Users/admin/code/app/node_modules/react-native-reanimated/android/CMakeLists.txt release|arm64-v8a : Writing build model to /Users/admin/code/app/node_modules/react-native-reanimated/android/build/intermediates/cxx/RelWithDebInfo/2u516l44/logs/arm64-v8a/build_model.json
:react-native-reanimated:configureCMakeRelWithDebInfo[arm64-v8a] (Thread[Execution worker Thread 4,5,main]) completed. Took 0.216 secs.

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

  • What went wrong:
    Execution failed for task ':react-native-reanimated:configureCMakeRelWithDebInfo[arm64-v8a]'.

[CXX1405] exception while building Json A problem occurred starting process 'command '/Users/admin/Library/Android/sdk/cmake/3.18.1/bin/cmake''

@konstantindt
Copy link
Author

I retested with 3.3.0 - same issues.

@fmacherey
Copy link

I also having the same issue, but only when building on circleCI. Local build is fine.

Also v3.3.0 and 3.2.0.

@fmacherey
Copy link

So i downgraded to v2.17.0 and my build in the CI is working again. I know, this is not really a "fix", but it might help to take a deeper look into the changes between these versions.
If you need more infos, I'm glad if you reach out.

@MarlonAEC
Copy link

MarlonAEC commented Jun 15, 2023

I did the same as @fmacherey (downgraded to 2.17) and my CI also worked but so far no luck with reanimated 3.1 and with the same characteristic as @fmacherey working in the local build but not on Azure CI. The only difference is that my React native version is 0.71 but other than that is the same. Looking forward to solving this issue I would be glad to help!
Note: my problem is not with the flavors but just the react-native-reanimated:configureCMakeDebug[arm64-v8a] FAILED ... java.lang.StackOverflowError (no error message)

@manuelabarca
Copy link

I have the same issue in version 2.17.0 with react-native 0.72

 ERROR  Error: Exception in HostFunction: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZN8facebook5react19ReadableNativeArrayC1EN5folly7dynamicE" referenced by "/data/app/~~mrxTlAaIGFQ8Jyi4r8aQYg==/com.iskaypet.tiendanimal.development-UGLmIK_KMOXiqCgyAuXmgg==/lib/arm64/libreanimated.so"..., js engine: hermes
 LOG  Running "IkpMobileCore" with {"rootTag":11}
 ERROR  Invariant Violation: "IkpMobileCore" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called., js engine: hermes

@aliza-khu
Copy link

@fmacherey, I am also having the same issue.
Working fine on Android Studio but failing on CircleCI.
Looking for the solution.
I Hope this should be resolved quickly.

@naftalibeder
Copy link
Contributor

naftalibeder commented Jun 30, 2023

I may have found a fix to build on Android. After upgrading the Gradle plugin version to 7.4.2 (from 7.3.1 in my case), I was able to assemble a build with Reanimated 3.3.0, without the cmake error. I'd be interested to see if this fixes it for other people.

@nvdbleek
Copy link

nvdbleek commented Jul 4, 2023

Any updates on this? I have the same problem on react native 0.71.8 with Reanimated 3.3.0 and Gradle plugin 7.4.2 (and Gradle 7.5.1). The problem only occurs on CI, not when building on my Mac.

@aliza-khu
Copy link

aliza-khu commented Jul 5, 2023

A fix for the issue is at most required. Please share the update for this as soon as possible. Failing only on CircleCI.

@naftalibeder
Copy link
Contributor

I have the same problem on react native 0.71.8 with Reanimated 3.3.0 and Gradle plugin 7.4.2 (and Gradle 7.5.1).

@nvdbleek I neglected to mention that I also bumped to Gradle 7.6.2. Worth trying?

@konstantindt
Copy link
Author

@fmacherey, I am also having the same issue.
Working fine on Android Studio but failing on CircleCI.
Looking for the solution.
I Hope this should be resolved quickly.

For me failing on Android Studio and on GitHub Actions.

@konstantindt
Copy link
Author

Any updates on this? I have the same problem on react native 0.71.8 with Reanimated 3.3.0 and Gradle plugin 7.4.2 (and Gradle 7.5.1). The problem only occurs on CI, not when building on my Mac.

For me only 1 Mac in my org it worked on that wasn't mine and nothing else. We downgraded to v2 to move forward.

@sjransom
Copy link

Same exact issue, builds fine locally but fails on AppCenter

react-native: 0.71.11
react-native-reanimated: 3.3.0

Execution failed for task ':react-native-reanimated:configureCMakeRelWithDebInfo[arm64-v8a]'.

@vagnerlandio
Copy link

I got the same error running:

react-native: 0.72.3
react-native-reanimated: 2.14.0

upgrade to react-native-reanimated: 3.3.0 and execute yarn start --reset-cache solved the problem for me

@Dat-Mobile
Copy link

Same to me, build local is fine but failed on circleci, not sure due to anything cached

"react-native": "0.72.3",
"react-native-reanimated": "^3.3.0",

@Dat-Mobile
Copy link

Finally downgrading to v2 work for me

"react-native": "0.72.3",
"react-native-reanimated": "2.17.0",
"react-native-gesture-handler": "2.8.0",

@aliza-khu
Copy link

@Dat-Mobile, If you downgrade the version to 2. Did you face the below errors in your project from iOS Side? Below is the screenshot for your reference:
Screenshot 2023-07-21 at 8 57 24 AM

@Dat-Mobile
Copy link

Damn I forgot to run ios, I faced the same error like you @aliza-khu

@Jahvon-DS
Copy link

I have the same issue in version 2.17.0 with react-native 0.72

 ERROR  Error: Exception in HostFunction: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZN8facebook5react19ReadableNativeArrayC1EN5folly7dynamicE" referenced by "/data/app/~~mrxTlAaIGFQ8Jyi4r8aQYg==/com.iskaypet.tiendanimal.development-UGLmIK_KMOXiqCgyAuXmgg==/lib/arm64/libreanimated.so"..., js engine: hermes
 LOG  Running "IkpMobileCore" with {"rootTag":11}
 ERROR  Invariant Violation: "IkpMobileCore" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called., js engine: hermes

have you found any solution ? I'm receiving the same error

@dejawho
Copy link

dejawho commented Aug 10, 2023

I'm having the same issue in version 2.17.0 with react-native 0.72

Any solution?

@Jahvon-DS
Copy link

2.17.0

I've upgraded to 3.3.0. And it seems to work for me now

@DeveloperMCD
Copy link

I am having the same issue. Tried upgrading Gradle/Gradle Build (both versions, as suggested above) and using React Native 0.72.4, as well as React-native-reanimated 3.4.2.
Can't get it to build anywhere.

@Jahvon-DS
Copy link

I am having the same issue. Tried upgrading Gradle/Gradle Build (both versions, as suggested above) and using React Native 0.72.4, as well as React-native-reanimated 3.4.2. Can't get it to build anywhere.

Have you tried to remove the android folder? I had to do this as well to get my build to work and followed this [https://stackoverflow.com/questions/43214862/how-to-rebuild-the-entire-android-folder] make sure you have the react-native-eject package.

@Gabriel-Mariano
Copy link

i am facing the same problem, when i downgrade reanimated version to 2.17.0 it works fine on android but stops working on ios, and when i update to latest it stops working on android.

@ahmedkhan181354
Copy link

what kind of reanimated version we use in which we will free from these all errors

@aliza-khu
Copy link

@konstantindt, Is there any estimated time for the fix?

@daniell5g
Copy link

@konstantindt, any progress on this solution?

@AntonyDonald
Copy link

I have the same issue in version 2.17.0 with react-native 0.72

 ERROR  Error: Exception in HostFunction: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZN8facebook5react19ReadableNativeArrayC1EN5folly7dynamicE" referenced by "/data/app/~~mrxTlAaIGFQ8Jyi4r8aQYg==/com.iskaypet.tiendanimal.development-UGLmIK_KMOXiqCgyAuXmgg==/lib/arm64/libreanimated.so"..., js engine: hermes
 LOG  Running "IkpMobileCore" with {"rootTag":11}
 ERROR  Invariant Violation: "IkpMobileCore" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called., js engine: hermes

@glenne
Copy link

glenne commented Sep 30, 2023

I ran npx @rnx-kit/align-deps --requirements react-native@0.72 -align-deps and took all the suggestions but for react which I wanted 0.72.5. Killed my packager, did yarn install and it was working again.

@AntonyDonald
Copy link

I have the same issue in version 2.17.0 with react-native 0.72

 ERROR  Error: Exception in HostFunction: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZN8facebook5react19ReadableNativeArrayC1EN5folly7dynamicE" referenced by "/data/app/~~mrxTlAaIGFQ8Jyi4r8aQYg==/com.iskaypet.tiendanimal.development-UGLmIK_KMOXiqCgyAuXmgg==/lib/arm64/libreanimated.so"..., js engine: hermes
 LOG  Running "IkpMobileCore" with {"rootTag":11}
 ERROR  Invariant Violation: "IkpMobileCore" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called., js engine: hermes

the react native reanimated plugin was not set correctly in babel.config.js. it's work for me.

@miallo
Copy link

miallo commented Oct 31, 2023

@AntonyDonald can you be more specific? Our babel.config.js is very small and I don't see a difference from the install instructions:

module.exports = {
    presets: ["module:metro-react-native-babel-preset"],
    plugins: [
        // reanimated has to be listed last!
        "react-native-reanimated/plugin",
    ],
};

@Ritikkk-09
Copy link

Same exact issue, builds fine locally but fails on AppCenter

react-native: 0.71.11
react-native-reanimated: 3.3.0

Execution failed for task ':react-native-reanimated:configureCMakeRelWithDebInfo[arm64-v8a]'.

Did you resolve it ?

@Ritikkk-09
Copy link

Ritikkk-09 commented Nov 6, 2023

I downgrade reanimated verion to 2.17.0 and its working but when i chane packeg name of my project i get new error

Error: Exception in HostFunction: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZN8facebook5react19ReadableNativeArrayC1EN5folly7dynamicE" referenced by "/data/app/~~_ToGqDKK8cVOq-SqqCyYbw==/com.praarthana-Y_foKm07iGBrw0tScv6QBA==/lib/arm64/libreanimated.so"..., js engine: hermes

@dev-suhail135
Copy link

I downgrade reanimated verion to 2.17.0 and its working but when i chane packeg name of my project i get new error

Error: Exception in HostFunction: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZN8facebook5react19ReadableNativeArrayC1EN5folly7dynamicE" referenced by "/data/app/~~_ToGqDKK8cVOq-SqqCyYbw==/com.praarthana-Y_foKm07iGBrw0tScv6QBA==/lib/arm64/libreanimated.so"..., js engine: hermes

Steps worked for me:

  • uninstalled package
    npm uninstall react-native-reanimated
  • removed node_modules
  • installed reanimated
    npm i react-native-reanimated
  • npm start -- --reset-cache

this has worked for me

@quicksilverr
Copy link

Facing a similar solution, in the release apk. When I unzip it, except arm64 architecture, all other architecture folders in the lib, have the libreanimated.so file missing

@aliza-khu
Copy link

@fmacherey, have try to update the react-native-reanimated version recently?, Did you have any update on same?

@fmacherey
Copy link

@aliza-khu hey :) no update from my side. Currently I am also not working actively on the mentioned project and don't have to time to look deeper into this... sorry.

@aliza-khu
Copy link

@fmacherey, Thank you for the quick response 👍. If you still found any update regarding this in future then please share it here.

@aliza-khu
Copy link

@konstantindt, Any update on this from your side?

@piaskowyk
Copy link
Member

Hey 👋 I've just tried to reproduce it but it works for me without any problems. I lunched this repo - https://github.com/konstantindt/react-native-reanimated from issue description. I have tried different flavours. It seems to be a problem not strict related to reanimated but more to proper environment configuration. I will share my current configuration maybe it will help a bit.

Project configuration: https://github.com/konstantindt/react-native-reanimated
System: MacOS 14.1.2
Chip: Apple M1 Pro
Android Studio: Hedgehog | 2023.1.1
Java: openjdk 17.0.8
Simulator: Pixel2, Android 12L
Installed NDK:
image

Me and my teammates, we are unable to reproduce it and unfortunately we can't help more with this issue :/
If someone have any new information please open a new issue 🙏

@Gjoshi3107
Copy link

Did anyone find the solution?
I am getting the same issue, with react-native-reanimated 2.17.0 and 2.14.4 both.....

Error: Exception in HostFunction: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol 
"_ZN8facebook5react19ReadableNativeArrayC1EN5folly7dynamicE" referenced by 
"/data/app/~~5hsfAQdOxdwNktWSMr6hTw==/com.pixilapps.selfcare-WJPknls-QLgHOODwFbJDqQ==/base.apk!/lib/arm64-
v8a/libreanimated.so"..., js engine: hermes

My package.json

"dependencies": {
    "@appdynamics/react-native-agent": "^24.7.0",
    "@formatjs/intl-pluralrules": "^1.5.3",
    "@google/react-native-make-payment": "^0.1.2",
    "@hmscore/react-native-hms-push": "^6.11.0-300",
    "@react-native-community/async-storage": "^1.8.1",
    "@react-native-community/geolocation": "^3.1.0",
    "@react-native-community/masked-view": "^0.1.11",
    "@react-native-community/netinfo": "^5.8.1",
    "@react-native-community/toolbar-android": "^0.2.1",
    "@react-native-firebase/analytics": "^20.5.0",
    "@react-native-firebase/app": "^20.5.0",
    "@react-native-firebase/app-distribution": "^20.5.0",
    "@react-native-firebase/crashlytics": "^20.5.0",
    "@react-native-firebase/messaging": "^20.5.0",
    "@react-native-firebase/perf": "^20.5.0",
    "@react-native-firebase/remote-config": "^20.5.0",
    "@react-native-picker/picker": "^2.5.1",
    "@react-navigation/bottom-tabs": "^5.0.7",
    "@react-navigation/drawer": "^5.1.0",
    "@react-navigation/material-top-tabs": "^5.1.1",
    "@react-navigation/native": "^5.1.3",
    "@react-navigation/stack": "^5.2.6",
    "@sentry/react-native": "^6.1.0",
    "@shopify/flash-list": "^1.6.3",
    "axios": "^1.6.2",
    "axios-auth-refresh": "^2.2.8",
    "credit-card-type": "^10.0.0",
    "d3-array": "^3.2.4",
    "d3-scale": "^4.0.2",
    "lottie-ios": "^4.3.3",
    "lottie-react-native": "^6.4.1",
    "moment": "^2.29.4",
    "native-base": "2.15.2",
    "patch-package": "^8.0.0",
    "react": "18.2.0",
    "react-error-boundary": "^4.0.11",
    "react-intl": "^6.4.4",
    "react-native": "0.72.6",
    "react-native-adjust": "^4.35.1",
    "react-native-aes-crypto": "^1.3.10",
    "react-native-biometrics": "^3.0.1",
    "react-native-code-push": "^8.3.1",
    "react-native-contacts": "^7.0.7",
    "react-native-date-picker": "^4.3.3",
    "react-native-device-info": "^7.0.2",
    "react-native-easy-markdown": "^2.0.0",
    "react-native-error-boundary": "^1.2.4",
    "react-native-fast-image": "^8.6.3",
    "react-native-flipper": "^0.164.0",
    "react-native-gesture-handler": "^2.13.2",
    "react-native-get-random-values": "1.3.1",
    "react-native-google-api-availability": "^0.1.0",
    "react-native-image-picker": "^7.0.1",
    "react-native-image-zoom-viewer": "^3.0.1",
    "react-native-jailbreak": "^0.1.0",
    "react-native-linear-gradient": "^2.8.3",
    "react-native-maps": "1.15.3",
    "react-native-mmkv": "2.12.2",
    "react-native-mmkv-flipper-plugin": "^1.0.0",
    "react-native-modal": "^13.0.1",
    "react-native-onesignal": "^4.5.0",
    "react-native-pager-view": "6.1.2",
    "react-native-payments": "^0.8.4",
    "react-native-pdf": "6.7.3",
    "react-native-permissions": "^4.1.5",
    "react-native-reanimated": "2.17.0",
    "react-native-restart": "^0.0.14",
    "react-native-safe-area-context": "^0.7.3",
    "react-native-screens": "^3.25.0",
    "react-native-sha256": "^1.4.10",
    "react-native-share": "^9.4.1",
    "react-native-shimmer-placeholder": "^2.0.9",
    "react-native-signature-capture": "^0.4.12",
    "react-native-snap-carousel": "^3.9.1",
    "react-native-splash-screen": "^3.3.0",
    "react-native-spotlight-search": "^2.2.0",
    "react-native-sqlite-storage": "^6.0.1",
    "react-native-svg": "^13.14.0",
    "react-native-tab-view": "^2.13.0",
    "react-native-text-input-mask": "3.0.2",
    "react-native-tracking-transparency": "^0.1.2",
    "react-native-video": "^5.2.1",
    "react-native-vision-camera": "^3.6.4",
    "react-native-webview": "^13.6.2",
    "react-native-youtube-iframe": "^2.3.0",
    "react-redux": "^8.1.3",
    "redux": "^4.0.5",
    "redux-devtools-extension": "^2.13.8",
    "redux-flipper": "^2.0.2",
    "redux-logger": "^3.0.6",
    "redux-observable": "^1.2.0",
    "redux-persist": "^6.0.0",
    "reselect": "^4.0.0",
    "rn-fetch-blob": "^0.12.0",
    "rxjs": "^6.5.4",
    "typescript-fsa": "^3.0.0",
    "typescript-fsa-reducers": "^1.2.1",
    "url-parse": "^1.4.7",
    "uuid": "^7.0.3",
    "xls2json": "^0.0.3",
    "xlsx-2-json": "^1.0.2"
  }
  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs review Issue is ready to be reviewed by a maintainer Platform: Android This issue is specific to Android Repro provided A reproduction with a snippet of code, snack or repo is provided
Projects
None yet
Development

No branches or pull requests