如何加载在你的Andr​​oid项目的另一个.so文件? [英] How to load another .so file in your android project?

查看:143
本文介绍了如何加载在你的Andr​​oid项目的另一个.so文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的图书馆应该成为我们的项目之外创建的,它应该从外面我们的项目叫呢?请给出任何建议。我已经知道了如何创建这样的文件和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.

这篇关于如何加载在你的Andr​​oid项目的另一个.so文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆