首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Android >

Android下怎么发布纯C/C++的应用

2012-09-04 
Android上如何发布纯C/C++的应用我下载了NDK,里面sapmles目录下有个“native-activity”的demo,请问这个demo

Android上如何发布纯C/C++的应用
我下载了NDK,里面sapmles目录下有个“native-activity”的demo,请问这个demo编译后如何安装到android手机上,“hello-jni”这个demo我安装运行是可以的,但它是通过Java代码调用的,我想问下能否不通过JNI,直接将纯C++应用部署的手机上运行,求步骤,先说声谢谢!
另外,“native-activity”这个demo的代码中有个名为void android_main(struct android_app* state) 的函数,注释说,这个是程序入口,请问这个是不是android上的main函数,程序要怎么编译或配置后才能调用这个入口:

C/C++ code
/** * This is the main entry point of a native application that is using * android_native_app_glue.  It runs in its own thread, with its own * event loop for receiving input events and doing other things. */void android_main(struct android_app* state) {


[解决办法]
用opengl做界面的话应该就和java没啥关系了。
[解决办法]
HTML code
Note however that is is possible to write a sophisticated application innative code with a small "application wrapper" used to start/stop itappropriately. 

热点排行