I just tried to get started with react-native and realm. Followed the tutorial here: Tutorial from realm I did nothing, just - react-native init demo - cd demo - npm install realm --save - react-native link
fixed the "....." stuff to "......"
and tried with react-native run-android to start the app. It starts and closes immediately.
Why? Any ideas?
Thanks
ps: I had to install nvm for Windows and changed with nvm use 8.15.0 to an earlier version of node than 11.6.0.. as it seems that realm is not supporting it yet and I am testing on a real device (Xiaomi Redmi Note 5)
same for adding with yarn or using react native 0.57.1
this is the log...
--------- beginning of main
01-31 07:33:53.919 8187 8187 D ReactNative: ReactInstanceManager.ctor()
01-31 07:33:53.967 8187 8187 D ReactNative: ReactInstanceManager.createReactContextInBackground()
01-31 07:33:53.967 8187 8187 D ReactNative: ReactInstanceManager.recreateReactContextInBackgroundInner()
--------- beginning of crash
Im having the exact same problem. Im working on a mac and testing on a Huawei.
@Wangor It looks like v0.58.0 of react-native isn't compatible/ breaks something in realm as of now;
a temporary solution will be to initialize your RN project using v0.57.8
Steps:
react-native init --version="[email protected]" projectName
cd projectName
npm install realm --save
react-native link
And it should work
@hkadyanji
Seems to work! Thanks a lot for your help as I was trying as well with 0.57.1...
Is there s list with working and not working versions?
(somehow like a matrix? RN Version, Realm Version)
@hsnMoghadasi thank you!
Hey - looks like you forgot to add a T:* label - could you please add one?
Most helpful comment
@Wangor It looks like v0.58.0 of react-native isn't compatible/ breaks something in realm as of now;
a temporary solution will be to initialize your RN project using v0.57.8
Steps:
react-native init --version="[email protected]" projectName
cd projectName
npm install realm --save
react-native link
And it should work