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

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

问题描述

我们的库应该在我们的项目之外创建,并且应该在我们的项目中从外部调用?请给出任何建议.我已经知道如何创建 so 文件和所有内容.但无法将该 .so 文件调用到不同的 android 项目中".请帮助我..

解决方案

你的问题看起来像 是您在执行 FFMPEG 时可以下载 .so 文件的地方.

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,

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

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.

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.

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

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