react-native-v8 icon indicating copy to clipboard operation
react-native-v8 copied to clipboard

CMake build error due to incorrect absolute RN_DIR path

Open BrechtBD opened this issue 2 years ago • 0 comments

I'm getting a cmake error when building the react-native application with react-native-v8 version 1.4.0

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-v8:generateJsonModelDebug'.
> C:\DEV\...\node_modules\react-native-v8\android\CMakeLists.txt : C/C++ debug|armeabi-v7a : CMake Error at C:\DEV\p...\node_modules\react-native-v8\android\CMakeLists.txt:117 (add_library):
    Syntax error in cmake code when parsing string

      C:\DEV\...\node_modules\react-native/ReactCommon/jsiexecutor/jsireact/JSIExecutor.cpp;C:\DEV\projects\delijn\ControleApp\node_modules\react-native/ReactCommon/jsiexecutor/jsireact/JSINativeModules.cpp

    Invalid character escape '\D'.

I believe it's because following piece of code returns the RN_DIR path using backward slashes (while it should be forward slashes?): https://github.com/Kudo/react-native-v8/blob/11b0a6de66bcde8e39dd6b7cdd3b2b625b018776/android/build.gradle#L14-L23

BrechtBD avatar Jun 01 '22 12:06 BrechtBD