react-native-mmkv-storage: Android build fails
react-native 0.63.4 react-native-mmkv-storage 0.6.3
* What went wrong:
Execution failed for task ':react-native-mmkv-storage:externalNativeBuildRelease'.
> Build command failed.
Error while executing process /usr/local/lib/android/sdk/cmake/3.10.2.4988404/bin/ninja with arguments ***-C /home/runner/work/reactnative-app/reactnative-app/node_modules/react-native-mmkv-storage/android/.cxx/cmake/release/armeabi-v7a rnmmkv***
ninja: Entering directory `/home/runner/work/reactnative-app/reactnative-app/node_modules/react-native-mmkv-storage/android/.cxx/cmake/release/armeabi-v7a'
...
[37/37] Linking CXX shared library /home/runner/work/reactnative-app/reactnative-app/node_modules/react-native-mmkv-storage/android/build/intermediates/cmake/release/obj/armeabi-v7a/librnmmkv.so
FAILED: /home/runner/work/reactnative-app/reactnative-app/node_modules/react-native-mmkv-storage/android/build/intermediates/cmake/release/obj/armeabi-v7a/librnmmkv.so
: && /usr/local/lib/android/sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=armv7-none-linux-androideabi21 --gcc-toolchain=/usr/local/lib/android/sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64 --sysroot=/usr/local/lib/android/sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/sysroot -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -fexceptions -frtti -std=c++1y -DONANDROID -Oz -DNDEBUG -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libgcc_real.a -Wl,--exclude-libs,libatomic.a -Wl,--build-id=sha1 -Wl,--no-rosegment -Wl,--fatal-warnings -Wl,--exclude-libs,libunwind.a -Wl,--no-undefined -Qunused-arguments -shared -Wl,-soname,librnmmkv.so -o /home/runner/work/reactnative-app/reactnative-app/node_modules/react-native-mmkv-storage/android/build/intermediates/cmake/release/obj/armeabi-v7a/librnmmkv.so CMakeFiles/rnmmkv.dir/rnmmkv-adapter.cpp.o /usr/local/lib/android/sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/arm-linux-androideabi/21/liblog.so /home/runner/work/reactnative-app/reactnative-app/node_modules/react-native-mmkv-storage/android/build/react-native-0.63.4.aar/jni/armeabi-v7a/libreactnativejni.so core/libcore.a -landroid /usr/local/lib/android/sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/arm-linux-androideabi/libz.a -latomic -lm && :
ld: error: undefined symbol: facebook::jsi::Value::~Value()
>>> referenced by jsi-inl.h:112 (/home/runner/work/reactnative-app/reactnative-app/android/../node_modules/react-native/ReactCommon/jsi/jsi/jsi-inl.h:112)
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 34 (16 by maintainers)
I am also getting same problem ,I tried all solution above but not work for me ,any ldea for help me?
Okay,
I found it. It simply does not work with lower and higher than
3.10.2.4988404
CMake version.Also, in the
local.properties
file, I had to define cmake path:Thank you so much for the live help and the support for the library @ammarahm-ed 😃
I’m getting a similar error.
Using react-native-mmkv-storage@0.6.4, react-native@0.63.4, CMake 3.10.2.4988404, NDK 21.4.7075529, and the build.gradle change described here. No other JSI packages. I’ve tried deleting node_modules and running
./gradlew.bat clean
, didn’t change anything. However, downgrading to react-native-mmkv-storage@0.6.0 works.It should work. Maybe something greater than 3.18 would work fine.
Uncheck cmake 3.6.x. Apply changes.