-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Comments
I'm also experiencing the build error
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
|
I retested with 3.3.0 - same issues. |
I also having the same issue, but only when building on circleCI. Local build is fine. Also v3.3.0 and 3.2.0. |
So i downgraded to |
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! |
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 |
@fmacherey, I am also having the same issue. |
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. |
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. |
A fix for the issue is at most required. Please share the update for this as soon as possible. Failing only on CircleCI. |
@nvdbleek I neglected to mention that I also bumped to Gradle 7.6.2. Worth trying? |
For me failing on Android Studio and on GitHub Actions. |
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. |
Same exact issue, builds fine locally but fails on AppCenter
|
I got the same error running:
upgrade to |
Same to me, build local is fine but failed on circleci, not sure due to anything cached
|
Finally downgrading to v2 work for me
|
@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: |
Damn I forgot to run ios, I faced the same error like you @aliza-khu |
have you found any solution ? I'm receiving the same error |
I'm having the same issue in version 2.17.0 with react-native 0.72 Any solution? |
I've upgraded to 3.3.0. And it seems to work for me now |
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. |
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. |
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. |
what kind of reanimated version we use in which we will free from these all errors |
@konstantindt, Is there any estimated time for the fix? |
@konstantindt, any progress on this solution? |
|
I ran |
the react native reanimated plugin was not set correctly in babel.config.js. it's work for me. |
@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",
],
}; |
Did you resolve it ? |
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:
this has worked for me |
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 |
@fmacherey, have try to update the react-native-reanimated version recently?, Did you have any update on same? |
@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. |
@fmacherey, Thank you for the quick response 👍. If you still found any update regarding this in future then please share it here. |
@konstantindt, Any update on this from your side? |
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 Me and my teammates, we are unable to reproduce it and unfortunately we can't help more with this issue :/ |
Did anyone find the solution?
My package.json
|
Description
When using Android flavours running into blocking build issues e.g.
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:
About Android Studio:
Steps to reproduce
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
The text was updated successfully, but these errors were encountered: