一个本地库添加到APK [英] Add a native lib to an APK

查看:251
本文介绍了一个本地库添加到APK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发一些使用本机code Android应用程序。

I'm developing an Android application that uses native code.

我需要一个外部本地库添加到我的APK的lib文件夹中的每个版本。

I need to add an external native library to my APK's lib folder on every build.

我怎么能这样做?

感谢。

推荐答案

放入本地库路径库默认为库项目中的文件夹中。

Put the library in the native library path which defaults to "libs" in your project folder.

如果你建立本地code为'armeabi目标,然后把它放在库/ armeabi。如果是通过armeabi-V7A建成然后把它放在库/ armeabi-V7A。

If you built the native code for the 'armeabi' target then put it under libs/armeabi. If it was built with armeabi-v7a then put it under libs/armeabi-v7a.

<project>/libs/armeabi/libstuff.so

这篇关于一个本地库添加到APK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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