mediapipe icon indicating copy to clipboard operation
mediapipe copied to clipboard

library "libmediapipe_jni.so" not found

Open nfadeluca opened this issue 3 years ago • 5 comments

System information:

  • Have I written custom code?: No
  • OS Platform and Distribution: Linux Ubuntu 22.04
  • MediaPipe version: v0.8.10.2
  • Bazel version: 5.2
  • Solution: Hands
  • Programming Language and version: JDK 18.0.1
  • Emulator: Pixel 4a, API 30, R Android 11.0 x86_64 (Android Studio Virtual Device)

Expected behavior: On running solution in Android Studio emulator, once start camera is pressed, webcam view should be presented and hand detection should work as displayed in Mediapipe examples.

However, once start camera is pressed, webcam activates yet screen of the application remains black or the application crashes.

Reproducing Error: I reproduced the error on another device using:

  • Ubuntu 21.10
  • Mediapipe v0.8.10.2
  • Bazel v5.2
  • JDK v.11.0.2
  • Emulator: Pixel XL, API 30, R Android 11.0 x86_64 (Android Studio Virtual Device)

Followed all instruction to install as listed in: https://google.github.io/mediapipe/getting_started/install.html Installed SDK & NDK through Android Studio's SDK Manager, using: Android SDK 33.0.0 & 30.0.3 NDK 21.4.7075529

However due to an error that occurred on both devices I had to copy dx.jar from Android/Sdk/build-tools/30.0.3/lib into Android/Sdk/build-tools/33.0.0/lib which allowed me to move forward in the installation process without errors.

I built and ran the Hands Solution following the Mediapipe guide under the 'Building Solution Example' Apps section at: https://google.github.io/mediapipe/getting_started/android_solutions.html

Just to Re-iterate: I run the MainActivity of the solution through android studio after importing it as a new project, and following the steps listed on the Mediapipe guide, the app loads up with three option, I press the start camera option, and then the screen either goes black with the webcam turned on, or the app crashes. After this, the Run terminal contains the error below:

Other info / Complete Logs : The following error appears in Android Studio's run terminal after the black screen occurs image

nfadeluca avatar Jul 12 '22 19:07 nfadeluca

Hi @nfadeluca , The error seems to beUnexpected CPU variant for X86 using defaults: x86_64. The AAR you downloaded only supports armeabi and arm64. It doesn't have x86_64 support (mostly for emulators).

sureshdagooglecom avatar Jul 13 '22 05:07 sureshdagooglecom

@sureshdagooglecom I don't remember selecting a specific AAR to download.. Is this to do with Android Studio? Where can I find the proper AAR for x86_64?

nfadeluca avatar Jul 13 '22 14:07 nfadeluca

Hi @nfadeluca , Could you please provide steps to reproduce this issue.

sureshdagooglecom avatar Jul 26 '22 14:07 sureshdagooglecom

@sureshdagooglecom Hi Suresh, I have already wrote the steps down in the Reproducing the Error section of my post above.

nfadeluca avatar Jul 26 '22 15:07 nfadeluca

Hi @nfadeluca . Yes, it is to do with android studio and please check this closed issue https://github.com/google/mediapipe/issues/2979.

sureshdagooglecom avatar Aug 05 '22 06:08 sureshdagooglecom

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you.

google-ml-butler[bot] avatar Aug 12 '22 07:08 google-ml-butler[bot]

Closing as stale. Please reopen if you'd like to work on this further.

google-ml-butler[bot] avatar Aug 19 '22 07:08 google-ml-butler[bot]

Are you satisfied with the resolution of your issue? Yes No

google-ml-butler[bot] avatar Aug 19 '22 07:08 google-ml-butler[bot]