![]() Step 0: Downloading the ToolsĪlright, let’s get started. The JavaNative C exchanges add some overhead, so it’s only really worthwhile if you’ve got some intensive processing to do. This can be particularly true of OpenGL ES applications written for other platforms.ĭon’t assume you’ll increase your application’s performance just because you’re using native code. If you’ve got loads of C code for your existing application, using the NDK could speed up your project’s development process as well as help keep changes synchronized between your Android and non-Android projects. Also, don’t forget that in Android 2.2, a JIT compiler will improve the performance of such code as well.Īnother reason to use the NDK is for ease of porting. That is, you have algorithms that are using all of the processor within the DalvikVM and would benefit from running natively. Generally speaking, you only need to use the NDK if your application is truly processor bound. ![]() However, we’d like to take a moment to talk about why the NDK is important, when it should be used, and-just as importantly, when it should not be used. So, if you’re reading this tutorial, you may already be considering the NDK for your Android projects. The complete sample project for this tutorial can be downloaded open source code. Be aware that you may have to do some troubleshooting of your own before you get everything working smoothly on your development system. That said, using the NDK is still a process that is prone to problems and issues even if you consider yourself a mobile development veteran. If you aren’t comfortable with these, you’re welcome to read this tutorial, of course, but you may have difficulties at certain steps that would be resolved by being comfortable with the above.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |