-
Notifications
You must be signed in to change notification settings - Fork 68
Open
Description
Hello, I've been trying to get this package working on the latest react native version and it took me a while so just wanted to leave this info here. The most irritating bug was the app building but instantly crashing on my physical phone with no discernable error.
This is for windows 10, using CLI, and for RN version 0.63.4.
Follow these steps to install properly:
- react-native init ProjectName
- install react-native-fs using deps
- npm install react-native-fs --save --legacy-peer-deps
- link -fs (if you run without linking the app will crash)
- react-native link react-native-fs
- do a test run
- npx react-native run-android
- <--- the app should run here, working fine as intended
- install -opencv3 using deps
- npm install react-native-opencv3 --save --legacy-peer-deps
- change jetifier to false in \android\gradle.properties
- run
- npx react-native run-android
- builds but on my phone it instantly crashes
- If it fails delete the build folder in\android\app\build
- now it should work
- as a quick test, i included this line in the out of the box app.js right under
import React from 'react';
import {CvCamera, CvScalar, Mat, CvInvoke, CvInvokeGroup} from 'react-native-opencv3';
- WORKS!
I have yet to see if there are other issues, but I have been able to run the test projects by running git clone -> npm install -> having a 2nd cmd prompt in the same folder and running npx react-native start -> running npx react-native run-android in the 1st cmd prompt. At least I know it works on an older react native version.
Metadata
Metadata
Assignees
Labels
No labels