Step 03: Tools for developing Libraries (C)

Page Last Updated: 6th November 2011

Additional downloads and installation steps required to develop native libraries for Android (i.e. in addition to those specified in Step 01: Tools for Developing Apps/Services (Java)).

Downloads required:

  1. Download Android Native Development Kit (NDK)
  2. Download cygwin
  3. We need to download the latest packages of cygwin before transferring it to the development PC
    1. Visit http://cygwin.com/install.html and download setup.exe
    2. Create a folder called "cygwin" in the root of your C: drive
    3. Place setup.exe in "C:\cygwin"
    4. Execute setup.exe
    5. Click Next
    6. Select "Download without installing" and click Next
    7. Select "Direct Connection" and click Next
    8. Wait for the mirror list to be downloaded
    9. Select any mirror and click Next
    10. Wait for package list to be downloaded
    11. The next window will ask you to "Select Packages"
    12. Locate "Devel" in the list and click on the word "Default" placed next to it
    13. Clicking on the word "Default" will cause it to change to "Install"
    14. Click Next twice.
    15. The download will begin, wait for it to complete. The total amount of data that will be downloaded is ~ 932MB
    16. Transfer the "cygwin" folder to your development PC. Copy it to its C: thereby recreating the c:\cygwin folder on the Development PC. You may want to zip the folder on the PC on which you downloaded it and then copy and extract the folder on your Development PC.
  4. Download C/C++ Development Tooling (CDT) Plugin for Eclipse

Installation Steps:

  1. Install cygwin
    1. Start Windows Explorer
    2. Browse to "C:\cygwin"
    3. Execute setup.exe
    4. Click Next
    5. Select "Install from Local Directory" and click Next twice
    6. The next window will ask you to "Select Packages"
    7. Locate "Devel" in the list and click on the word "Default" placed next to it
    8. Clicking on the word "Default" will cause it to change to "Install"
    9. Click Next to begin installation.
    10. Click "Finish" to complete the installation
  2. Extract Android Native Development Kit (NDK)
    1. Extract contents of aandroid-ndk-r6b-windows.zip to "C:"
    2. "C:\android-ndk-r6b" will be created containing all the tools for native development
  3. Install C/C++ Development Tooling (CDT) Plugin for Eclipse
    1. Disable Ethernet/WiFi and any other network connection during the installation of CDT Plugin to prevent Eclipse from trying to connect to the internet to verify package information. If your connection firewall or limited for some reason (e.g. firewall or proxy), Eclipse will waste time trying to communicate with its servers without success, so its better to disable WiFi and unplug your Ethernet cable.
    2. While in Eclipse, click on the "Help" menu and select "Install New Software"
    3. Click Add, in the top-right corner
    4. In the Add Site dialog, click Archive
    5. Browse to and select "cdt-master-8.0.1.zip"
    6. Enter a name for the local update site (e.g., "CDT Plugin") in the "Name" field.
    7. Click OK.
    8. In the Available Software dialog, select the checkboxes next to all the items EXCEPT for the following:
      • Under "CDT Optional Features":
        • C/C++ Remote Launch
      • Under "TCF":
        • Target Communication Framework (Incubation)
        • Target Communication Framework (Incubation), CDT Extender
        • Target Communication Framework (Incubation), RSE Extender
    9. Click Next Twice.
    10. Read and accept the license agreements, then click Finish.
    11. Note: If you get a security warning saying that the authenticity or validity of the software can't be established, click OK.
    12. When the installation completes, restart Eclipse.

References: