如何加载在你的Andr​​oid项目的另一个.so文件?你的、加载、文件、项目

2023-09-05 00:10:08 作者:‖Angel°半路青春

我们的图书馆应该成为我们的项目之外创建的,它应该从外面我们的项目叫呢?请给出任何建议。我已经知道了如何创建这样的文件和all.But无法调用.so文件到不同的Andr​​oid项目。请帮助我..

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..

推荐答案

您的问题,看起来像的这个问题,

Your questions looks like this question,

我已经知道了如何创建这样的文件和all.But无法调用.so文件到不同的Andr​​oid项目

"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 - 添加文件夹JNI /库/ *这样

1 - Add folder jni/libs/*.so

2 - 使用右击鼠标 - > Android的工具 - >添加原生支持 - >文件*的.cpp组名称

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

3 - 两个文件:*的.cpp和Android.mk出现

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

4 - 使用Cygwin建立和放大器;编译*。所以到项目中。

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

P / S:

您也应该定义Android.mk完全建成之前,在该文件中的内容。

Application.mk用于建立到哪个文件夹

APP_PLATFORM也很重要,也应该准确定义。

按照以下图片了解更多详情,有关结果。

Follow this image for more details, about the result.

谢谢

P / S::当你这样做,你可以调用文件**所以*从文件夹中的 JNI 的通过以下code:

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

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

下载.so文件

这是,你在哪里可以下载.so文件在执行FFMPEG。

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

 
精彩推荐
图片推荐