Using JNI to invoke C + + under Android is quite normal in developing the game. But debugging the C + + section is a very troublesome issue. If you quickly locate the crash location. The NDK provides a gadget ndk-stack.First, we configure the environment to configure the NDK
We know that the Android NDK program will generate a tombstone backtrace when it crashes (or take advantage of the ADB Logcat Crawl), and from this backtrace we can see which function caused the crash, but usually because we publish it is Rele ASE version, can not take advantage of the address information in the BackTrace directly to the source code and line number, when the error that caused the crash is n
later use convenient, choose a short name, and then save
C Turn on the Cygwin, enter the CD $NDK, and if you output the/CYGDRIVE/E/ANDROID-NDK-R5 information configured above, the environment variable setting is successful.
4. Use NDK to compile the program
A Now we use the installed
current Cygwin version and running state, if the status is OK, then Cygwin run normal.
Then enter gcc–version,g++--version,make–version,gdb–version to test, if all print out version information and some description information, then Cygwin installation success!
3. Configure NDK Environment variables
A First find the Cygwin installation directory, find a home\
b Open the Bash_profile file and add ndk=/c
CPU or overwrite the compiler/linker tag (see Docs/APPLICATION-MK.html for more details)
(4) compile your code from the directory of your project by running "$ ndk/ndk-build", or starting from the subdirectory
(5) You can copy the last step. In case of success, strip the application-layer sequence of the Shared Library to the project root directory of your application. Then you generate the final APK throu
Ndk-stack location error (dynamically loaded so), ndk-stackso
We usually use ndk-stack to locate the so error in libs. When the so error is dynamically loaded on the SD card, it cannot be loaded multiple times. Otherwise, the location error may occur.
Operation Command
(A
location is E: \ android-ndk-r5 \ samples \ hello-JNI (depending on your location ),
2. Run cygwin and enter the command CD/cygdrive/e/android-ndk-r5/samples/Hello-JNI to enter the E: \ andro
GoalThe Android plugin for Eclipse (ADT) now supports NDK-based application development.It can proactively generate project and artifact files, as well as code stubs, and can be integrated into the entire Android application development (building native libraries, copying libraries to the corresponding JNI directory within the project, packaging the app, and gene
be entered at will, and the Location is Simplified Language Pack for eclipse in Chinese (Simplified). After installation, Eclipse restarts.
2. Establish an NDK Development Environment1. Install Android NDK.
(1) Introduction: NDK, Native Development Kit, provides a series o
=/cygdrive/Ndk=/cygdrive/e/android-ndk-r6Export NDKThe NDK name is random, for the convenience of later use, choose a short name, and then saveJune 7, 2013: It must be noted here, the input can not have extra symbols, it is best not to copy and paste, I tried many times, direct copy paste absolutely to error. When open
interface when creating new project Include C++ Support . Checking it will create a default C + + Java-Mixed demo program. Let's take a look at this official standard demo.
Before you start, it's a good idea to download the NDK first, see NDK development from getting started to giving up (one: Getting Started with the basic process), which is to download or select the correct path in the project s
What is the NDK?The NDK is the abbreviation for Native Development Kit, the local development kit. The ndk,android allows developers to use native code languages, such as C + +, to complete some (or all) of the functionality of the app. Note: Some places also translate native into "native" for reasons of translation.Th
enter gcc–version,g++--version,make–version,gdb–version for testing, and if you print out the version information and some descriptive information, the Cygwin installation is successful!3. Configure NDK Environment variablesAFirst find the Cygwin installation directory, find a home\b Open a. bash_profile file, add ndk=/cygdrive/Ndk=/cygdrive/e/
Target
Android plug-in for Eclipse (ADT) now supports NDK-based application development. It can automatically generate project and component files and code stubs, and can be integrated into the entire Android Application Development (build the native library, copy the Library to the corresponding JNI folder in the project, package the application, and generate th
Android SDK Android NDK android Studio officialIf the download speed is too slow, please use thunder, Baidu cloud offline and other methods to download.For Linux systems, if you cannot upgrade online, see belowsudo vi/etc/hostsAdd to74.125.206.93 dl-ssl.google.comHere are the various.
2014.7ADT BundleHttp://dl.goog
1. Development Environment Configuration
As we all know, it is difficult to start with everything. configuring a development environment is the most basic and necessary step for all development projects.
All software and development platforms used: win7 + netbeans + VMware + Ubuntu + ndk + Android SDK
First of all, in win7 platform to configure the development of Androi
[Android ndk jni] android-ndk-r9d + adt-bundle-windows environment construction-Hello-jni case study, androidndkr9d
Refer to the blog: http://blog.csdn.net/leilu2008/article/details/12495273
My android ndk version is:
Summary
Introduction
Learn about Android for x86
Ndk compilation tool
Compile
Check apk
Install a simulator
Debug apk
IntroductionDear developers, Android tablets Based on INTEL x86 architecture are coming soon. Please read this article carefully to make your applications run properly on x86 devices.
Understanding A
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.