ammarahm-ed / react-native-jsi-template

Template library and blog that explain how JSI modules are built from scratch in React Native
https://blog.notesnook.com/getting-started-react-native-jsi/
MIT License
163 stars 24 forks source link

please help me out with reactnative 0.67.1 #8

Open yaaliuzhipeng opened 2 years ago

yaaliuzhipeng commented 2 years ago

I created an jsi example from scratch followed your blog . But it failed at compile stage (android ) , I cannot figure out what's the missing step cause I followed the steps from blog strictly. Maybe something changed from rn0.67.1 to rn0.63.4 of this template project. I'd be graceful if you are able to provide an newer version example . thanks a lot 🙏.

ammarahm-ed commented 2 years ago

@yaaliuzhipeng The code examples are older on the blog. But this template is updated and works on latest android. What you can do to build successfully is use build.gradle and CMakeLists.txt from this repo and your app should build successfully.

Also it would be good if you can share what error are you facing so I know exactly what to fix..

yaaliuzhipeng commented 2 years ago

@yaaliuzhipeng The code examples are older on the blog. But this template is updated and works on latest android. What you can do to build successfully is use build.gradle and CMakeLists.txt from this repo and your app should build successfully.

Also it would be good if you can share what error are you facing so I know exactly what to fix..

thanks again. I'd like to try it again from scratch with your suggestion . I'll come back later no matter it works or not . if not , I'll post my issues here .😘

yaaliuzhipeng commented 2 years ago

Well , my example app was initialized from react-native newest template which version is 0.67.1 . So I simplified some gradle code . Basically , the problem is now about the libjsi.so . Gradle Build error came out like below

Please set them or make sure they are set and tested correctly in the CMake files:
JSI_LIB

I thought the error might be the LIBRN_DIR which is "${BUILD_DIR}/react-native-0/jni/${ANDROID_ABI}" and yet I haven't found some dirs start with react-native-0 from the specified location .So I tried to find out something from the mmkv repository. And I did found the jsi prebuilt directory inside ReactAndroid . Still got the same error . it would be great if you can take a look at my example below ... thanks anyway

https://github.com/yaaliuzhipeng/react-native-awesome-jsi