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

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

问题描述

向APK添加本机lib的精确副本.由于没有答案,我决定再次询问.

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天全站免登陆