JiriHoffmann / react-native-clusterer

React Native clustering library using C++ Supercluster implementation
MIT License
157 stars 20 forks source link

React Native 0.68.0 build error (REACT_NATIVE_JNI_LIB) #3

Closed engee-nl closed 2 years ago

engee-nl commented 2 years ago

Thank for you this great library! So I was trying it out on the latest React Native version 0.68.0 and I am getting the following build error :

See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings 38 actionable tasks: 32 executed, 6 up-to-date

FAILURE: Build failed with an exception.

What went wrong: Execution failed for task ':react-native-clusterer:configureCMakeDebug'.

C/C++: C:*****\reactnative0680\node_modules\react-native-clusterer\android\CMakeLists.txt debug|armeabi-v7a : CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: REACT_NATIVE_JNI_LIB

linked by target "rnclusterer" in directory C:/*****/reactnative0680/node_modules/react-native-clusterer/android

Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

Get more help at https://help.gradle.org

BUILD FAILED in 12s

Removing REACT_NATIVE_JNI_LIB in the CMakeLists.txt solved the problem, but I am not sure if it will produce other problems.

Steps to reproduce the problem

  1. Create a new React Native project, react-native init reactnative0680 --version 0.68.0
  2. Install react-native-clusterer, npm install react-native-clusterer
  3. run react-native run-android

Thanks in advance!

JiriHoffmann commented 2 years ago

This seems to be an issue with caching. I can't figure out why but deleting android/app/build/.cxx folder fixes the issue.

focux commented 2 years ago

I'm having this same issue and tried deleting the .cxx folder but still not working.

JoniVR commented 2 years ago

@JiriHoffmann I'm facing the same issue, I removed the build folder and did a gradle clean, still get this error on latest react-native 0.68.2. Seems like the PR might fix it.

ghost commented 2 years ago

Hello, this fix is working locally, but when I try to build it in AppCenter, it throws this error. I'm using the latest release, 1.2.0 and react-native 0.68.2

image

Thanks in advance!

THMkjorl commented 2 years ago

Im still seeing this error on RN 0.68.2 & expo 45.0.5

dandre-hound commented 1 year ago

Same here - unable to build on android with the same versions listed above: RN 0.68.2 & expo 45.0.5