Jump to content
ChaJH

Error in the mraa library to be used by Android studio "libmraajava.so" not found

Recommended Posts

image.png

The image above is Android Studio using mraa-2.2.0.aar.

I need Uart control Tinker Board 2S.

However, when you build an app through Tinkerboard using the mraa library, the app dies with the following error.

 

[java.lang.UnsatisfiedLinkError: dlopen failed: library "libmraajava.so" not found]

 

The error is suspect.
I can't find libmraajava.so .
However, the mraa-2.2.0.aar file does not contain libmraajava.so in jni.

image.png

https://github.com/TinkerBoard/TinkerBoard/wiki/Developer-Guide#mraa-library-for-android

 

It doesn't work with what I received from the official address above, so what's the problem?

image.png

Code for the problem mraaJNI.class found by debugging.

Additionally, when executing code to call GPIO, you get a [ libmraajava.so not found ] error as you go to the static try {} catch {} just above

 

import mraa.Gpio

import mraa.Dir

 

var gpio = Gpio(1) // error code start...

Share this post


Link to post
Share on other sites

@tooz

Android Studio >> Android-studio-2023.1.1.27-window.exe
 

My Project build.gradle >

image.png

image.png

 

이거 물어보는 게 맞나요?

Edited by ChaJH

Share this post


Link to post
Share on other sites
  • Members
  •  0
  • 1 post
 

Android Studio >> android-studio-2023.1.1.27-windows.exe
 

My Project build.gradle >

image.png

image.png

 

Is it right to ask this?

Share this post


Link to post
Share on other sites

hello @ChaJH

1. i mean the tinker board android os version you're using (for example android 11 v.2.0.8), did you get the sources from here? TinkerBoard-Android/rockchip-android-manifest (github.com)

2. the sample codes from this .zip does include libmraajava.so, would you like to give it a try? 

The Sample codes of Mraa API for Tinker Board 2: Android-MraaDemo_tinkerboard2.zip

Share this post


Link to post
Share on other sites
4 minutes ago, tooz said:

hello @ChaJH

1. i mean the tinker board android os version you're using (for example android 11 v.2.0.8), did you get the sources from here? TinkerBoard-Android/rockchip-android-manifest (github.com)

2. the sample codes from this .zip does include libmraajava.so, would you like to give it a try? 

The Sample codes of Mraa API for Tinker Board 2: Android-MraaDemo_tinkerboard2.zip

My Tinker Board Android OS : Android 12 V3.0.2 (This is the latest version.)
 

https://tinker-board.asus.com/download-list.html?product=tinker-board-2s 

image.png

@tooz,  As you said, can I get it in that version and proceed with it?

image.png

Like the image above.
Can I download and use Tinker Board OS from the official site (https://tinker-board.asus.com/download-list.html?product=tinker-board-2s) )?

Or, should I download it from the giturl you told me?

Share this post


Link to post
Share on other sites
2 hours ago, tooz said:

hello @ChaJH

1. i mean the tinker board android os version you're using (for example android 11 v.2.0.8), did you get the sources from here? TinkerBoard-Android/rockchip-android-manifest (github.com)

2. the sample codes from this .zip does include libmraajava.so, would you like to give it a try? 

The Sample codes of Mraa API for Tinker Board 2: Android-MraaDemo_tinkerboard2.zip

thank you sir, @tooz!

mraa works normally.

Thank you very much.

  • Like 1

Share this post


Link to post
Share on other sites

hello @ChaJH

how did you solve the problem? did you redownload the source codes, or did you use the sample codes of mraa api for tinker board 2?

Share this post


Link to post
Share on other sites
17 hours ago, tooz said:

hello @ChaJH

당신은 그 문제를 어떻게 해결했습니까? 소스 코드를 다시 다운로드하셨나요, 아니면 mraa api의 샘플 코드를 팅커보드 2에 사용했나요?

Hello @tooz
I downloaded the OS image version you told me.
So it becomes a gpio control with mraa.

Share this post


Link to post
Share on other sites

hello @ChaJH

got it, thanks for the update. the mraa library will be added in the next android 12 os release too 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...