Android的 - JNI指南 [英] Android - JNI guidelines

查看:152
本文介绍了Android的 - JNI指南的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要纳入小,瘦肉和平均基于C语言的语法分析器到我的Andr​​oid项目。我已经做了JNI编程在过去,但没有任何类型的Andr​​oid原生(C)的发展。我的计划是编译C lib放到SO创造周围JNI包装而我会在我的应用程序使用。请问这是怎么能够/应该如何解决?其次,也是最重要的问题 - 我怎么能有。所以到我的APK?它会去哪里?

I want to incorporate small, lean and mean C-based parser into my Android project. I've done JNI programming in the past but not any type of native (C) development on Android. My plan is to compile C lib into SO and create JNI wrapper around it which I'm going to use in my app. Is this how it can/should be done? Second and most important question - how can I include .so into my APK? Where would it go?

推荐答案

使用的Andr​​oid NDK 结果
下载无文档的Andr​​oid NDK 1.6

这会节省你写的lib JNI层,也将安装该应用程序在您的应用程序数据文件夹的lib文件夹。

This will save you from writing JNI layer for lib and also will install the app in the lib folder of your app data folder.

这篇关于Android的 - JNI指南的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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