当前位置: 代码迷 >> Android >> Android下怎么发布纯C/C++的应用
  详细解决方案

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

热度:34   发布时间:2016-05-01 14:57:22.0
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.
  相关解决方案