制作的Andr​​oid NDK应用程序与NativeActivity的? [英] Making Android NDK apps with NativeActivity?

查看:183
本文介绍了制作的Andr​​oid NDK应用程序与NativeActivity的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道,在一个正常的NDK编译的C ++库建成并打包成一个apk文件。但是,我怎么能在Eclipse中自动执行此?我曾尝试以下的http://mhandroid.word$p$pss.com/2011/01/23/using-eclipse-for-android-cc-development/要运行与NDK附带的本地活动的样品,它结束了没有工作。我通过了,包括过去的大部分引用错误的,甚至后,没有任何反应,当我运行它作为一个Android应用程序(使用的摩托罗拉手机插入)。

I know that in a normal NDK build, the C++ libraries are built and packed into an apk file. But how can I automate this in Eclipse? I have tried following http://mhandroid.wordpress.com/2011/01/23/using-eclipse-for-android-cc-development/ to run the native-activity sample that came with the NDK, and it ended up not working. Even after I got past most of the reference errors via including, nothing happens when I run it as an Android Application (with a Motorola phone plugged in).

我环顾四周,相当多的这件事,我依然坚持,所以我愿意在这一点上的建议。谢谢!

I have looked around quite a bit about this and am still stuck, so I'm open to suggestions at this point. Thanks!

(请记住,我使用的MinGW / MSys的Windows 7上,多为使用bash运行脚本)

(Please keep in mind that I'm using MinGW/MSys on Windows 7, mostly for running scripts with bash)

推荐答案

我刚刚决定去与Ubuntu的虚拟机并使用,并与一些调整它似乎是工作的方式应该。我用的http://mhandroid.word$p$pss.com/2011/01/23/using-eclipse-for-android-cc-development/ http://developer.android.com/sdk/ndk/overview。 HTML#天然活性中得到的一切成立。也是一个非常重要的注意事项,转到C / C ++常规 - > code分析 - >启动在Eclipse项目设置和禁用这两方面的选项,您所做的任何本地活动。我不知道是否有设置库的好方法,包括为它工作,但目前在NDK居住错误检查螺丝的东西了,我目前可以成功打造离不开它。另外,它还是会标志着红色错误失败的构建后,所以发现错误时,你不应该在中间的地方是完全

I've just decided to go with an Ubuntu VM and use that, and with some tweaking it seems to be working the way it should. I used a combination of http://mhandroid.wordpress.com/2011/01/23/using-eclipse-for-android-cc-development/ and http://developer.android.com/sdk/ndk/overview.html#native-activity to get everything set up. Also a very important note, go to C/C++ General -> Code Analysis -> Launching in your Eclipse project settings and disable both of those options for any native activities you make. I'm not sure if there's a good way to set the libs and includes up for it to work, but currently live bug checking screws things up in the NDK, and I can currently build successfully without it. Plus it'll still mark errors in red after a failed build, so you shouldn't be completely in the middle of nowhere when finding errors.

这篇关于制作的Andr​​oid NDK应用程序与NativeActivity的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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