Are you really suitable for NDK development?


Recently, many people say that Android is becoming more and more difficult to find a job. Will it be better to learn NDK development? Let’s talk about this today. Should we choose to learn NDK?

1. Which scenarios need NDK development?

Cross platform libraries, such as ffmpeg, skip, weex,

Reinforcement, anti reverse

Signature verification

Image compression

Audio and video decoding

OpenGL es advanced special effects

Hot fix

Face recognition++

encryption algorithm

Game development

So files in wechat apk


So files in mobile Taobao apk


2. What is the difference between NDK development and JNI development?

JNI is java national interface, JNI is just a middle layer. JNI should be implemented in C / C + +. Achieve the communication between C / C + + and Java. It doesn’t have to be compiled into so file to develop JNI. It’s not only available on Android. Java programmers can also do JNI, but they can’t write activity. Java’s simplest main function can declare a native method. In VS, write a piece of C / C + + code according to JNI specification. Compiled into a DLL file, put into a java project, the same can be executed. So is just the product of DLL on different platforms, because Android is based on Linux platform.

3. Is it necessary to develop NDK?

If your business and NDK development application scenarios are not very related, it is reasonable not to engage in them. After all, there are many things in Java and Android that you won’t play. Such as plug-in (pure java can do), such as performance optimization, such as advanced custom controls, such as source code learning and so on. It’s been a long time. Play these for a while. You’re an expert.

Of course, if you have a business connection. Such as camera beauty, filter, audio and video, if you want to advance, NDK needless to say, you must be able to play. NDK essentially plays C / C + +, so we need to learn C / C + +, such as virtual function, virtual deconstruction, virtual base class, intelligent pointer, macro function, macro definition, struct, common body, operator overload, pointer, these basic C + + related. Object oriented can be used in any language.

4. If you want to learn, how to learn?

Google official NDK link:

Foreigners have one: Android NDK starter’s Guide

Online blog finally look at the system, or do not read, or write a East, West write an article, there is no systematic line, to help beginners is of little significance.

JNI specification.chm this manual, very easy to query

The Java™ Native Interface Programmer’s Guide and Specification

After getting familiar with JNI, then write some small cases to get familiar with it. You can read some advanced books with C / C + +, such as effective c + +, in-depth understanding of C + + object memory model, STL source code analysis, and so on.

The most correct way is to practice the program. It doesn’t mean it will. Let’s start with so many questions. Welcome to discuss.

Recommended Today

JPA hibernate generates DDL by comparing entity and DB

JPA hibernate generates DDL by comparing entity and DB Get entity information from JPA //build configuration //If you do not need to connect to DB, the configuration can be empty, that is, you do not need to set property Configuration configuration = new Configuration(); configuration.setProperty(Environment.DIALECT, DIALECT.getName()); configuration.setProperty(Environment.USER, USER_NAME); configuration.setProperty(Environment.PASS, PASSWORD); configuration.setProperty(Environment.URL, URL); configuration.setProperty(Environment.DRIVER, DRIVER); configuration.setPhysicalNamingStrategy(new […]