[java_api] [coco_detection_android_demo] Updating build.gradle to build libraries in Linux for android deployment#927
Open
IndraTheZeus wants to merge 4 commits intoopenvinotoolkit:masterfrom
Conversation
likholat
reviewed
Jul 30, 2024
...oid_demos/coco_detection_android_demo/app/src/main/java/org/intel/openvino/MainActivity.java
Show resolved
Hide resolved
Co-authored-by: Anna Likholat <aniali201398@gmail.com>
allnes
requested changes
Aug 1, 2024
|
|
||
| def native_resources = [] | ||
| def tbb_dir = System.getenv('TBB_DIR') | ||
| def tbb_dir = System.getenv('TBB_DIR') ?: System.getenv('OPV_HOME_DIR') + "/one-tbb-install/lib/cmake/TBB" |
Contributor
There was a problem hiding this comment.
one-tbb-install directory can be changed, it's just example and there cannot be a universal way to find TBB, that why System.getenv('TBB_DIR') is required
| } | ||
|
|
||
| def openVinoDir = System.getenv('INTEL_OPENVINO_DIR') ?: System.getenv('OPV_HOME_DIR') + "/openvino_install" | ||
| println ">>> INTEL_OPENVINO_DIR -> ${openVinoDir}" |
Contributor
There was a problem hiding this comment.
please add logging or remove simple print messages in demos
| ov_arch = "armhf"; | ||
| } | ||
|
|
||
| def openVinoDir = System.getenv('INTEL_OPENVINO_DIR') ?: System.getenv('OPV_HOME_DIR') + "/openvino_install" |
| tree.visit { FileVisitDetails details -> | ||
| if (!details.file.isDirectory()) { | ||
| resources_list += details.file.name + "\n" | ||
| println ">>> Adding ${details.file.name} to native_resources" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When building the openvino-java-api.jar, if you do not build in android OS you end up building the incorrect libraries leading to errors like java.lang.UnsatisfiedLinkError: No implementation found for long org.intel.openvino.Core.GetCore() (tried Java_org_intel_openvino_Core_GetCore and Java_org_intel_openvino_Core_GetCore__) - is the library loaded, e.g. System.loadLibrary?
In order to solve this, you must change the build.gradle file to the correct variables for the libraries are set and discovered
This issue was discovered by @Kabor42 from IRF Solutions KFT. Budapest, Hungary. It fixes #926