如何在不使用 NDK 的情况下将 Andrioid NDK 构建的共享库添加到我的 APK? [英] How do I add an Andrioid NDK-built shared library to my APK without using NDK?

查看:19
本文介绍了如何在不使用 NDK 的情况下将 Andrioid NDK 构建的共享库添加到我的 APK?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将本机库添加到 APK.由于没有答案,我决定再问一次.

Pretty much exact duplicate of Add a native lib to an APK. Since there was no answer I decided to ask again.

我有一个 Android 项目.我有一个用 android NDK 构建的 .so 库.我想在我的项目中使用这个 .so ,最好 - 不使用 NDK.

I have an Android project. I have an .so library built with android NDK. And I want to use this .so in my project, preferrably - without using NDK.

那么,我如何告诉 Eclipse(或 Android 工具)我需要将某些 .so 内置到我的 APK 中?

So, how do I tell Eclipse (or Android tools) that I need certain .so to be built into my APK?

推荐答案

实际上比我想象的要容易.我所要做的就是将 .so 放在 libs/armeabi-v7a - Eclipse 看到它并集成到 APK 中.

It's actually easier than I expected. All I had to do is place the .so in libs/armeabi-v7a - Eclipse saw it and integrated into APK.

但是,我是通过从另一个 Eclipse 项目复制来创建这个项目的,该项目实际上是从源代码构建这个 .so.所以,我认为有些设置是我需要设置的.随意添加更正或编辑我的答案.

However, I've made this project by copying from another Eclipse project, which was actually building this .so from source. So, I think there were some settings that I would otherwise need to set. Feel free to add corrections or edit my answer.

这篇关于如何在不使用 NDK 的情况下将 Andrioid NDK 构建的共享库添加到我的 APK?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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