Skip to content

Conversation

@IndraTheZeus
Copy link

@IndraTheZeus IndraTheZeus commented Jul 25, 2024

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

@IndraTheZeus IndraTheZeus requested review from a team as code owners July 25, 2024 13:13
@github-actions github-actions bot added the category: java API OpenVINO Runtime Java API label Jul 25, 2024
@likholat likholat requested a review from allnes July 30, 2024 11:12

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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as TBB

tree.visit { FileVisitDetails details ->
if (!details.file.isDirectory()) {
resources_list += details.file.name + "\n"
println ">>> Adding ${details.file.name} to native_resources"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sames sa with logging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: java API OpenVINO Runtime Java API platform: android OpenVINO on Android

Projects

None yet

Development

Successfully merging this pull request may close these issues.

java.lang.UnsatisfiedLinkError: Issue when building in linux and deploying in android for COCO Detection module with coco_detection_v1 [SOLVED]

3 participants