2
votes

Our library should be created outside of our project and it should be called with in our project from outside? please give any suggestion."I already know how to create so file and all.But not able to call that .so file into a different android project".please help me..

1
As far as i understand you have to have jni binding with your library(.so file) from java. In usual case you should create a jar library file along with your .so library.saiful103a
thanks,i tried this but its still showing error,could you pls elaborate ituser2995210

1 Answers

5
votes

Your questions looks like this question,

"I already know how to create so file and all.But not able to call that .so file into a different android project"

In another project, you should :

1 - Add folder jni/libs/*.so

2 - Use "Right-click mouse" -> Android Tools -> Add native support -> Set name of file *.cpp

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

4 - Use Cygwin to build & compile *.so into the project.

enter image description here

p/s :

  • You should also define content in the file Android.mk exactly before built.

  • Application.mk is used to build to which folder.

  • APP_PLATFORM also important too, should define exactly.

Follow this image for more details, about the result.

enter image description here

Thanks,

p/s : When you have done, you can call file **.so* from folder jni by using the following code :

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

DOWNLOAD .so FILE

It is where do you can download .so file while executing FFMPEG.