Android NDK course recording is now available, androidndk

Source: Internet
Author: User

Android NDK course recording is now available, androidndk

Recently, according to the company's arrangement, we have recorded the content developed by Android NDK. The overall course can be viewed on www.iotekclass.com, which will be displayed on a blog in the future.

This course outline is as follows:

Chapter 1 about NDK
Chapter 1 about NDK
Section 1 about NDK
Chapter 2 HelloWorld of NDK
Section 1 build a Windows Development Environment Section 2 HelloWorld developed by NDK
Chapter 3 JNI
Section 1 JNI introduction section 2 Local Code debugging information output section 3 transmission and return of basic data types section 4 String processing section 5 Reference Management Section 6 management jclass section 7 Management jobject section 8 Management Arrays
Section 9 access data members section 10 Local Code call Java Functions
Section 11th exception and Error Handling Section 12th cache jmethodID and jfieldID
Chapter 4 NDK and C ++
Section 1 use C ++ to implement JNI code
Section 2 NDK compilation Control Section 3 STL Support Section 4 C ++ 11 Support Section 5 use registration implementation section 6 Cocos2d-x 3.0 development environment installation section 7 Introduction to JNI in Cocos2d-x 3.0 section 8 Introduction to JNI in Android source code


    What method does android ndk use to call the android 40 source code?

    For a dynamic library, you can select loadsystem ("XXXX"). For uncompiled source code, you need to compile it into. a/. so before using it.

    How android uses ndk

    Some logics in the program are written in C. jni is used to call C code. It is difficult to view large arrays using the basic log method, I learned that the android ndk sdk has a tool named ndk-gdb which can easily debug the c code. The usage process is not smooth. When two errors occur, it takes a week to finally solve them. In windows, cygwin must be installed. First, go to the root directory of your project under the cygwin command line. If the program you want to debug is already running, run ndk-gdb directly. If the program you want to debug is not running, you can use ndk-gdb -- start to type the ndk-gdb command, and a series of library file loading information will appear. These libraries may fail to be loaded, but it does not matter. <gdb> prompt, enter the help command to view a series of commands. Use the l command to list the content of the c file. use the "file" command. use the following command to load the so file to be debugged: file obj/local/armeabi/libsearch-algorithm.so use list or l to view the loaded c file. Use B 100 to set a breakpoint in line 3 of the c file. Run the c or continue command to continue running the program. Error: Continuing. warning: Cannot insert breakpoint 1. error accessing memory address 0x11a0: Input/output error. cause of error: Use ndk-gdb -- start to start the first activity of the program, but the so file is not loaded at this time. Solution: first open the program and use it. When the so file is used, call the ndk-gdb command to debug the program process. Correct Process: 1. Create a simulator or use a real machine to run the program to be debugged to ensure that the so file has been loaded. 2. Call ndk-gdb in the root directory of the program. A gdb prompt is displayed. 3. Use the l command to print the c file. 4. Use B 10 to print the breakpoint on the tenth line of the c file. 5. Run the c command to restore the program.

    Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.