Android ndk builder for eclipse in Windows

Source: Internet
Author: User

If you worked on Android ndk, You must be knowing current eclipse ADT doesn' t have option for ndk building you have to manually run the build command in cygwin shell. now I will show you step by step how to make a builder for Android ndk project which will build your native code to Android library when you build your project or save a C source file
Requirements

  1. Eclipse
  2. Android ADT
  3. Android ndk
  4. Cygwin

If you don't know what is these please see this android ndk

Steps

  1. Import/open a ndk Project (say import hellojni from ndk samples)
  2. Open the Project Properties
  3. Select builders
  4. Press new and select programmefill in you cygwin bash.exe in location, working directory as project folder in Workspace fill the argument as ndk-build in my case it is "I: \ Dev \ droid \ SDK \ ndk-Build "(note this DoS style path will result in an Waring when compiling better usage will be cygwin path in my case it will be/cygdrive /I/dev/droid/SDK/ndk-build)
  5. Go to refresh tab tick refresh source on compilationclick specify resource and choose lib folder in you project (note the Lib folder maynot exist unless you compile the source atleast once for first time you can leave option to refresh the entire Workspace
  6. Go to environment tab and create a new variable named path and value to bin folder of cygwin and choose append to native environment
  7. Go to build options tab and tick after clean, during manual build, during auto build and specify relevant sources and choose JNI folder in Project
  8. Press finish
  9. In build order move ndk builder to the top
  10. All done
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.