Using the NDK plugin
来源:互联网 发布:潜在因子推荐算法 编辑:程序博客网 时间:2024/05/18 04:11
http://tools.android.com/recent/usingthendkplugin
ADT 20 includes an NDK plugin that provides support for building and debugging NDK projects in Eclipse. This document describes how to install and use the NDK plugin.
Installation
The NDK plugin currently works with CDT 7.0.2 or CDT 8.0.2.
- Download Eclipse for Java.
- Install CDT from Eclipse update sitehttp://download.eclipse.org/tools/cdt/releases/indigo.
- Install Android SDK + NDK Plugins from Eclipse update site https://dl-ssl.google.com/android/eclipse/
Using the NDK Plugin
1. First set the path to SDK and NDK:
Note that you will not be able to add native support if the project already has C/C++ nature.
At this point, you will be able to build your applications using Project -> Build All.
Debugging native applications
1. Update your build config to include “NDK_DEBUG = 1”.
1. First set the path to SDK and NDK:
Eclipse -> Window -> Preferences -> Android -> set path to SDK
Eclipse -> Window -> Preferences -> Android -> NDK -> set path to the NDK
Note that you will not be able to add native support if the project already has C/C++ nature.
At this point, you will be able to build your applications using Project -> Build All.
Debugging native applications
1. Update your build config to include “NDK_DEBUG = 1”.
Right click project -> properties -> C/C++ Build:
2. Set a breakpoint in your C code.
3. Right click on your project, select Debug As -> Android Native Application
Note: There is a delay of a few seconds between when the activity is launched and when native debugging starts. If your code is already executed by that point, then you won’t see the breakpoint being hit. So either put a breakpoint in code that is called repetitively, or make sure that you call JNI code after you see that ndk-gdb has connected.
Known Issues
1. Eclipse does not automatically find the include paths to all the NDK headers on Windows. This issue will be fixed in the next update (20.0.1) when it is released.
2. Eclipse does not automatically find the include paths with CDT 8.1.0 (Juno). This issue is tracked in Bug33788.
3. Right click on your project, select Debug As -> Android Native Application
Note: There is a delay of a few seconds between when the activity is launched and when native debugging starts. If your code is already executed by that point, then you won’t see the breakpoint being hit. So either put a breakpoint in code that is called repetitively, or make sure that you call JNI code after you see that ndk-gdb has connected.
Known Issues
1. Eclipse does not automatically find the include paths to all the NDK headers on Windows. This issue will be fixed in the next update (20.0.1) when it is released.
2. Eclipse does not automatically find the include paths with CDT 8.1.0 (Juno). This issue is tracked in Bug33788.
0 0
- Using the NDK plugin
- Using the NDK plugin
- Using the NDK plugin
- (ZT) Using the Android NDK
- “NDK integration is deprecated in the current plugin” Error
- “NDK integration is deprecated in the current plugin” Error
- Error: NDK integration is deprecated in the current plugin
- Error: NDK integration is deprecated in the current plugin
- Error: NDK integration is deprecated in the current plugin
- Error: NDK integration is deprecated in the current plugin.
- JNI开发 NDK integration is deprecated in the current plugin
- NDK integration is deprecated in the current plugin
- Using the Windows Media Player plugin with Firefox
- Using the HybridFox plugin to manage Openstack Nova
- Chapter 7. Using the FindBugs™ Eclipse plugin
- Debugging WebLogic Server Applications Using Eclipse and the WebLogic-Plugin
- Using the jQuery Validate Plugin with HTML5 Data Attribute Rules
- Android C native development using the NDK under Windows
- hdu 1781 Friend
- LeetCode OJ算法题(四十七):Rotate Image
- 编写C语言的技巧
- 引用
- poj2255(二叉树重建)
- Using the NDK plugin
- 验证码处理
- #ifndef,#define,#endif和#pragma once
- JS日期时间选择器
- LINUX 网络爬虫中使用正则匹配URL
- JAVA编译找不到符号
- 字体单位大小对照换算表(字号、磅、英寸、像素)
- 利用SmtpClient发送邮件
- 兔子