Original Android Native Debug

Source: Internet
Author: User

1, install ADT plugin, CDT plugin
2,SDK Directory Configuration:
The Eclipse File menu selects window---> Preferences---> Android---> Set the SDK location---> Browse to select the SDK directory. Such as:
NDK Directory Configuration:
After setting up the SDK, you also need to set the "NDK" on the "Android" configuration item, and after selecting the NDK, there is an option "NDK location", which configures the NDK root directory.
3, set the build parameter, set the build command in project->properties->c/c++ build, remove the Use default option, and add parameters after Ndk-build ndk_debug= 1, make compiled so with the source code debugging information.
4, right click on project, add native support menu
5, the result file compiled with NDK has OBJS directory, and the dynamic library under this directory is copied to the Libs directory.
6, run-time select the Android native application under Debug as
7, switch eclipse to DDMS view mode, select the process to debug, then click the Debug icon.

Problem:

1, unable to detect application ABI ' s

Workaround: Edit the Application.mk file to add the following two lines according to your emulator processor type and SDK level:

App_abi: = armeabi-v7a
App_platform: = android-14 (must correspond to android:minsdkversion in Androidmenifest.xml)

2.

Gdbserver output:  run-as : package Com.opencv.genderdetector ' is unknown

Verify if the application was built with NDK_DEBUG=1

Solution One:

$ adb shell

$ su

# chmod 771/data/data

# chown System.system/data/data

Solution Two:

Simulator can debug normally with simulator

Original Android Native Debug

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.