question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Android] Build failed for task buildCMakeDebug during upgrading v3

See original GitHub issue

Description

I did upgrade react native reanimated from 2.9.1 to 3.0.0-rc.4 react native version 0.67.4 IOS is working but android is not

Here is error

* What went wrong:
Execution failed for task ':react-native-reanimated:buildCMakeDebug[arm64-v8a]'.
> Build command failed.
  Error while executing process /Users/userm1/Library/Android/sdk/cmake/3.18.1/bin/ninja with arguments {-C /Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/android/.cxx/Debug/1w723312/arm64-v8a reanimated}
  ninja: Entering directory `/Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/android/.cxx/Debug/1w723312/arm64-v8a'
  [0/2] Re-checking globbed directories...
  [1/8] Building CXX object CMakeFiles/reanimated.dir/src/main/cpp/AndroidErrorHandler.cpp.o
  [2/8] Building CXX object CMakeFiles/reanimated.dir/src/main/cpp/AndroidScheduler.cpp.o
  [3/8] Building CXX object CMakeFiles/reanimated.dir/src/main/cpp/LayoutAnimations.cpp.o
  [4/8] Building CXX object CMakeFiles/reanimated.dir/src/main/cpp/JNIHelper.cpp.o
  [5/8] Building CXX object CMakeFiles/reanimated.dir/src/main/cpp/OnLoad.cpp.o
  [6/8] Building CXX object CMakeFiles/reanimated.dir/Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/Common/cpp/Tools/JSIStoreValueUser.cpp.o
  [7/8] Building CXX object CMakeFiles/reanimated.dir/src/main/cpp/NativeProxy.cpp.o
  [8/8] Linking CXX shared library ../../../../build/intermediates/cxx/Debug/1w723312/obj/arm64-v8a/libreanimated.so
  FAILED: ../../../../build/intermediates/cxx/Debug/1w723312/obj/arm64-v8a/libreanimated.so
  : && /Users/userm1/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=aarch64-none-linux-android21 --gcc-toolchain=/Users/userm1/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64 --sysroot=/Users/userm1/Library/Android/sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -fPIC -DFOLLY_NO_CONFIG=1 -DFOLLY_HAVE_CLOCK_GETTIME=1 -DFOLLY_HAVE_MEMRCHR=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_MOBILE=1 -DFOLLY_HAVE_RECVMMSG=1 -DFOLLY_HAVE_PTHREAD=1 -DANDROID -DREACT_NATIVE_MINOR_VERSION=67 -DHERMES_ENABLE_DEBUGGER=1 -fexceptions -fno-omit-frame-pointer -frtti -Wno-sign-compare -std=c++17 -Wall -Werror -DDEBUG -DJS_RUNTIME_HERMES=1 -O0 -fno-limit-debug-info  -g  -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libgcc_real.a -Wl,--exclude-libs,libatomic.a -Wl,--build-id -Wl,--fatal-warnings -Wl,--no-undefined -Qunused-arguments -shared -Wl,-soname,libreanimated.so -o ../../../../build/intermediates/cxx/Debug/1w723312/obj/arm64-v8a/libreanimated.so CMakeFiles/reanimated.dir/Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/Common/cpp/AnimatedSensor/AnimatedSensorModule.cpp.o CMakeFiles/reanimated.dir/Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/Common/cpp/Fabric/FabricUtils.cpp.o CMakeFiles/reanimated.dir/Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/Common/cpp/Fabric/ReanimatedUIManagerBinding.cpp.o CMakeFiles/reanimated.dir/Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/Common/cpp/Fabric/ShadowTreeCloner.cpp.o CMakeFiles/reanimated.dir/Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/Common/cpp/LayoutAnimations/LayoutAnimationsProxy.cpp.o CMakeFiles/reanimated.dir/Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/Common/cpp/NativeModules/NativeReanimatedModule.cpp.o CMakeFiles/reanimated.dir/Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/Common/cpp/NativeModules/NativeReanimatedModuleSpec.cpp.o CMakeFiles/reanimated.dir/Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/Common/cpp/ReanimatedRuntime/ReanimatedHermesRuntime.cpp.o CMakeFiles/reanimated.dir/Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/Common/cpp/ReanimatedRuntime/ReanimatedRuntime.cpp.o CMakeFiles/reanimated.dir/Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/Common/cpp/Registries/EventHandlerRegistry.cpp.o CMakeFiles/reanimated.dir/Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/Common/cpp/Registries/MapperRegistry.cpp.o CMakeFiles/reanimated.dir/Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/Common/cpp/Registries/NewestShadowNodesRegistry.cpp.o CMakeFiles/reanimated.dir/Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/Common/cpp/Registries/WorkletsCache.cpp.o CMakeFiles/reanimated.dir/Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/Common/cpp/SharedItems/FrozenObject.cpp.o CMakeFiles/reanimated.dir/Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/Common/cpp/SharedItems/MutableValue.cpp.o CMakeFiles/reanimated.dir/Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/Common/cpp/SharedItems/MutableValueSetterProxy.cpp.o CMakeFiles/reanimated.dir/Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/Common/cpp/SharedItems/RemoteObject.cpp.o CMakeFiles/reanimated.dir/Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/Common/cpp/SharedItems/ShareableValue.cpp.o CMakeFiles/reanimated.dir/Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/Common/cpp/Tools/FeaturesConfig.cpp.o CMakeFiles/reanimated.dir/Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/Common/cpp/Tools/JSIStoreValueUser.cpp.o CMakeFiles/reanimated.dir/Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/Common/cpp/Tools/Mapper.cpp.o CMakeFiles/reanimated.dir/Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/Common/cpp/Tools/RuntimeDecorator.cpp.o CMakeFiles/reanimated.dir/Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/Common/cpp/Tools/Scheduler.cpp.o CMakeFiles/reanimated.dir/Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/Common/cpp/Tools/WorkletEventHandler.cpp.o CMakeFiles/reanimated.dir/src/main/cpp/AndroidErrorHandler.cpp.o CMakeFiles/reanimated.dir/src/main/cpp/AndroidLogger.cpp.o CMakeFiles/reanimated.dir/src/main/cpp/AndroidScheduler.cpp.o CMakeFiles/reanimated.dir/src/main/cpp/JNIHelper.cpp.o CMakeFiles/reanimated.dir/src/main/cpp/LayoutAnimations.cpp.o CMakeFiles/reanimated.dir/src/main/cpp/NativeProxy.cpp.o CMakeFiles/reanimated.dir/src/main/cpp/OnLoad.cpp.o CMakeFiles/reanimated.dir/src/main/cpp/TurboModule.cpp.o -L/Users/userm1/projects/AwesomeApp/node_modules/react-native/ReactAndroid/src/main/jni/first-party/react/jni/arm64-v8a   -L/Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/android/build/third-party-ndk/hermes/jni/arm64-v8a -llog  -ljsi  -lglog  -lfbjni  -lfolly_json  -lreactnativejni  -landroid  -lhermes-executor-debug  -lhermes  -latomic -lm && :
  CMakeFiles/reanimated.dir/Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/Common/cpp/ReanimatedRuntime/ReanimatedHermesRuntime.cpp.o: In function `ReanimatedHermesRuntime':
  /Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/Common/cpp/ReanimatedRuntime/ReanimatedHermesRuntime.cpp:75: undefined reference to `facebook::hermes::inspector::chrome::enableDebugging(std::__ndk1::unique_ptr<facebook::hermes::inspector::RuntimeAdapter, std::__ndk1::default_delete<facebook::hermes::inspector::RuntimeAdapter> >, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&)'
  CMakeFiles/reanimated.dir/Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/Common/cpp/ReanimatedRuntime/ReanimatedHermesRuntime.cpp.o: In function `~ReanimatedHermesRuntime':
  /Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/Common/cpp/ReanimatedRuntime/ReanimatedHermesRuntime.cpp:87: undefined reference to `facebook::hermes::inspector::chrome::disableDebugging(facebook::hermes::HermesRuntime&)'
  CMakeFiles/reanimated.dir/Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/Common/cpp/ReanimatedRuntime/ReanimatedHermesRuntime.cpp.o: In function `RuntimeAdapter':
  /Users/userm1/projects/AwesomeApp/node_modules/react-native/ReactCommon/hermes/inspector/RuntimeAdapter.h:(.text._ZN8facebook6hermes9inspector14RuntimeAdapterC2Ev[_ZN8facebook6hermes9inspector14RuntimeAdapterC2Ev]+0x4): undefined reference to `vtable for facebook::hermes::inspector::RuntimeAdapter'
  /Users/userm1/projects/AwesomeApp/node_modules/react-native/ReactCommon/hermes/inspector/RuntimeAdapter.h:(.text._ZN8facebook6hermes9inspector14RuntimeAdapterC2Ev[_ZN8facebook6hermes9inspector14RuntimeAdapterC2Ev]+0x8): undefined reference to `vtable for facebook::hermes::inspector::RuntimeAdapter'
  CMakeFiles/reanimated.dir/Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/Common/cpp/ReanimatedRuntime/ReanimatedHermesRuntime.cpp.o: In function `~HermesExecutorRuntimeAdapter':
  /Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/Common/cpp/ReanimatedRuntime/ReanimatedHermesRuntime.cpp:42: undefined reference to `facebook::hermes::inspector::RuntimeAdapter::~RuntimeAdapter()'
  /Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/Common/cpp/ReanimatedRuntime/ReanimatedHermesRuntime.cpp:42: undefined reference to `facebook::hermes::inspector::RuntimeAdapter::~RuntimeAdapter()'
  CMakeFiles/reanimated.dir/Users/userm1/projects/AwesomeApp/node_modules/react-native-reanimated/Common/cpp/ReanimatedRuntime/ReanimatedHermesRuntime.cpp.o:(.data.rel.ro._ZTIN10reanimated28HermesExecutorRuntimeAdapterE[_ZTIN10reanimated28HermesExecutorRuntimeAdapterE]+0x10): undefined reference to `typeinfo for facebook::hermes::inspector::RuntimeAdapter'
  clang++: error: linker command failed with exit code 1 (use -v to see invocation)
  ninja: build stopped: subcommand failed.

Steps to reproduce

1.Upgrade with npm or yarn 2.Clear android project with gradle 3.Build

Snack or a link to a repository

there is no

Reanimated version

3.0.0-rc.4

React Native version

0.67.4

Platforms

Android

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

Paper (Old Architecture)

Build type

Debug mode

Device

Android emulator

Device model

No response

Acknowledgements

Yes

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
batuhansahancommented, Nov 4, 2022

@tomekzaw thanks its working with +68 i know. for now i will keep going with current(old) rn and reanimated versions because there is a lot of issues to solve when upgrade react native on my side.

0reactions
tomekzawcommented, Nov 24, 2022

Can you give me a solution other than converting rn 0.70.0 to 0.68+.

Just for the record, 0.68+ means any version greater or equal to 68, so currently 0.69 or 0.70.

It should work fine with 0.70.x, it just doesn’t work on 0.67.x.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Upgrading your build from Gradle 7.x to the latest
Back in Gradle 7.1 the :generatePrecompiledScriptPluginAccessors task ... build when a plugin application fails, and enable the build cache for that task.
Read more >
execution failed for task ':react-native-reanimated ... - You.com
Hello, I get this error when running the android build. ... [Android] Build failed for task buildCMakeDebug during upgrading v3 7. open batuhansahan ......
Read more >
Very confusing error when ninja and cmake are in different ...
I test Android Gradle Plugin 7.1.0-beta03 and one of dev's machines reported ... Task :modules:configureCMakeDebug[x86_64] FAILED FAILURE: Build failed with ...
Read more >
Build failed at Cmake while building native module - Super User
2 on android studio I am getting this error. What went wrong: Execution failed for task ':generateJsonModelDebug'. > Error occurred while ...
Read more >
A failure occurred while executing com.android.build.gradle ...
There is a new patch for react-native now so update it in your package.json. Mine is "react-native": "^0.70.3". and I ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found