How to load another .so file into an Android project?

Should our library be created outside of our project and should be called from outside our project? please give some suggestion. "I already know how to create such a file and that's it. But I can not call this .so file in another Android project." Help me..

+2
source share
1 answer

Your questions look like this question ,

"I already know how to create such a file and that’s all. But you cannot call this .so file in another Android project."

In another project, you should:

1 - Add the jni / libs / * folder. so

2 - Use "Right-click" β†’ Android Tools β†’ Add Built-in Support β†’ Set File Name * .cpp

3 - Two files appeared: * .cpp and Android.mk.

4 - Use Cygwin to build and compile * .so into a project.

enter image description here

p / s:

  • You should also define the content in the Android.mk file just before building.

  • Application.mk is used to create which folder .

  • APP_PLATFORM is also important, must specify.

Follow this image for more details on the results.

enter image description here

Thanks,

p / s: When you do this, you can invoke the ** file. so * from the jni folder using the following code:

static { System.loadLibrary("ffmpeg"); } 

DOWNLOAD .so FILE

This is where you can download the .so file at runtime FFMPEG.

+4
source

Source: https://habr.com/ru/post/916906/


All Articles