|
|
пре 2 недеља | |
|---|---|---|
| .. | ||
| OpenCV | пре 2 недеља | |
| gradle | пре 2 недеља | |
| README.md | пре 2 недеља | |
| build.gradle | пре 2 недеља | |
| gradle.properties | пре 2 недеља | |
| gradlew | пре 2 недеља | |
| gradlew.bat | пре 2 недеља | |
| settings.gradle | пре 2 недеља | |
Set JAVA_HOME and ANDROID_HOME environment variables. For example:
export JAVA_HOME=~/Android Studio/jbr
export ANDROID_HOME=~/Android/SDK
Download OpenCV SDK for Android
Run build script for version with Java and a shared C++ library:
python build_java_shared_aar.py "~/opencv-4.7.0-android-sdk/OpenCV-android-sdk"
Run build script for version with static C++ libraries:
python build_static_aar.py "~/opencv-4.7.0-android-sdk/OpenCV-android-sdk"
The AAR libraries and the local Maven repository will be created in the outputs directory
The scripts consist of 5 steps:
Preparing Android AAR library project template
Adding Java code to the project. Adding C++ public headers for shared version to the project.
Compiling the project to build an AAR package
Adding C++ binary libraries to the AAR package. Adding C++ public headers for static version to the AAR package.
Creating Maven repository with the AAR package
There are a few minor limitations: