- XCode
- Android Studio
- Clone the repository.
- Run
./downloadAndInsertOpenCV.sh
. - Download manually the Android pack from https://opencv.org/releases.html (version 3.4.1).
- Unzip the package.
- Import OpenCV to Android Studio, From File -> New -> Import Module, choose sdk/java folder in the unzipped opencv archive.
- Update build.gradle under imported OpenCV module to update 4 fields to match your project build.gradle a) compileSdkVersion b) buildToolsVersion c) minSdkVersion and d) targetSdkVersion.
- Add module dependency by Application -> Module Settings, and select the Dependencies tab. Click + icon at bottom, choose Module Dependency and select the imported OpenCV module. For Android Studio v1.2.2, to access to Module Settings : in the project view, right-click the dependent module -> Open Module Settings.
react-native run-ios
orreact-native run-android
.