• Android studio 1.5 RC1 builds NDK development environment


    Android studio has been updated to version 1.5. I upgraded. Recently, the project development needs to be configured with NDK, so it took a little time. Baidu, Google, is always unsuccessful, and the process is very sad. So summarize the configuration process in a small way for future reference, Create a new Android project for […]

  • Best Starter Practices for Android Studio NDK Development


    Best Starter Practices for Android Studio NDK Development Some online introductions of Android Studio NDK introductory course, feeling is not complete and comprehensive, and did not tell the beginners of Android Studio NDK some places to pay attention to. Most of the methods on the Internet need to be used.javahCommand, using this method will no […]

  • Android Studio NDK Development-Environment Configuration


    Android Studio NDK Development-Environment Configuration NDKFull nameNative Development Kit。 NDK is a collection of Android development tools. NDK provides a series of tools, which can help developers develop c/c++ on Android platform, and can automatically package. so in gold apk.NDK integrates cross compilers and providesMK fileIt can isolate CPU, platform and ABI differences, and only […]

  • Andorid Studio NDK Development-Hello World


    Introduced inAndroid StudioConfiguration of NDK development environment: Android Studio NDK development-environment configuration, NDK development environment configuration after completion, we need to write about the famousHello WorldProcedures.Before we start, we need to introduce Java and c/c++ communication: JNI (Java Native Inteface) is part of the Java platform, which allows Java code to interact with code written […]

  • Andorid Studio NDK Development – NDK Development Tool Gradle-experiment


    One of the more troublesome things about developing with NDK is writingApplication.mkandAndroid.mkAndroid Studio plug-insgradle-experimentalIt is used to solve this problem. Usegradle-experimentalPlug-ins can be written without rewriting*.mkNDK development in the case of files.gradle-experimentalAndroid Studio is an experimental project, based on a gradle plug-in, mainly used to automate the configuration of NDK implementation, no need to write […]

  • Andorid Studio NDK Development-LLDB Debugging


    LLDBIs an efficientc/c++The debugger isLLVM CompilerTogether, it provides a wealth of process control and data detection, which can effectively help us debug the program.LLDBIt has also replaced GDB as the default debugger for XCode.Android StudioIt can also be used in Chinese.LLDBDebugging NDK program, inAndroid StudioAlso can beLLDBFromSDK ToolsDownload inLLDBThe latest version, withAndroid Studioandgradle-experimentalIt will be […]

  • Andorid Studio NDK Development-Use Library


    C language is a huge treasure house. Many implementations at the bottom of the system are based on C language, such as image processing, encryption and so on.C language is also very efficient, so sometimes third-party C language libraries are introduced for efficiency.In a word, we will use a lot of libraries, the system’s own […]

  • Android Studio NDK Development-JNI Calls Java Functions


    There are more APIs to call in SDK than in NDK. Sometimes when we are doing NDK development, we need toJNIMethods and variables in direct Java, such ascallbackSystem information, etc.How to be inJNIWhat about calling Java methods? You need to know first.FindClassandGetMethodIDNow. FindClass and GetMethodID Through JNIFindClassYou can find Java classes, getjclassFor example, jclass clz=(*env)->FindClass(env,”com/jjz/JniHandle”); […]

  • Andorid Studio NDK Development – Using NDK Library


    C languageAndroid is an open source operating system based on Linux. Many implementations at the bottom of the system are based on it.C languageDevelopment, such as image processing, encryption, etc. On the other handC languageIt’s also much more efficient than Java development, so it’s sometimes used to run efficiently.C languageDevelop some functions. Use it on […]

  • Android Studio NDK Development – Other Compilation Options


    To support cross-compilation, NDK also needs to support the compilation of various Android versions, as well as other compilations, such as C and c++. NDK provides some compilation options to support different compilation requirements. Previous NDK developments were inAndroid.mkandAppliction.mkSettings in, now ingradle-experimentalOfandroid.ndk{}Set compilation options. It includes settings: compiler configuration, NDK version, header header file location, […]

  • Discussion: How to call Java class in NDK


    Don’t talk too much nonsense, just code it. Copy codeThe code is as follows: package com.clouddevelop.cloudbox;import android.graphics.Bitmap;import android.graphics.Canvas;import android.graphics.Color;import android.graphics.Paint;import android.graphics.Paint.FontMetrics;public class TextManager{    public Bitmap create(String text, float size)    {        try        {            Paint paint = new Paint();            paint.setColor(Color.WHITE);            paint.setTextSize(size);            paint.setAlpha(255);            paint.setFlags(Paint.ANTI_ALIAS_FLAG);            paint.setTextAlign(Paint.Align.LEFT);            paint.setAntiAlias(true);            float[] widths = new float[text.length()];;            paint.getTextWidths(text, widths);            float width = 0;            for(int […]