From: Andrey Pavlenko Date: Wed, 15 Aug 2012 07:44:54 +0000 (+0400) Subject: improving android tutorial v2 X-Git-Tag: accepted/2.0/20130307.220821~364^2~237 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6e07a1346cf54c1479921a56a2c5d7e045d076fd;p=profile%2Fivi%2Fopencv.git improving android tutorial v2 --- diff --git a/doc/tutorials/introduction/android_binary_package/android_dev_intro.rst b/doc/tutorials/introduction/android_binary_package/android_dev_intro.rst index 5e973b6..4313f55 100644 --- a/doc/tutorials/introduction/android_binary_package/android_dev_intro.rst +++ b/doc/tutorials/introduction/android_binary_package/android_dev_intro.rst @@ -325,17 +325,50 @@ We recommend the approach based on Eclipse :abbr:`CDT(C/C++ Development Tooling) #. Define the ``NDKROOT`` environment variable containing the path to Android NDK in your system (e.g. ``"X:\\Apps\\android-ndk-r8"`` or ``"/opt/android-ndk-r8"``). **On Windows** an environment variable can be set via :guilabel:`My Computer -> Properties -> Advanced -> Environment variables` and restarting Eclipse. + On Windows 7 it's also possible to use `setx `_ command in a console session. **On Linux** and **MacOS** an environment variable can be set via appending a ``"export VAR_NAME=VAR_VALUE"`` line to the :file:`"~/.bashrc"` file and logging off and then on. -#. Text 1. +#. Open Eclipse and load the Android app project to configure. + +#. Add a "native nature" to the project via Eclipse menu :guilabel:`New -> Other -> C/C++ -> Convert to a C/C++ Project`. - Text 2. + .. image:: images/eclipse_cdt_cfg1.png + :alt: Configure CDT + :align: center + ` ` + + .. image:: images/eclipse_cdt_cfg2.png + :alt: Configure CDT + :align: center + +#. Check the project(s) to convert, the "Project type" = ``Makefile project``, "Toolchains" = ``Other Toolchain``. + + .. image:: images/eclipse_cdt_cfg3.png + :alt: Configure CDT + :align: center + +#. Open :guilabel:`Project Properties -> C/C++ Build`, unckeck ``Use default build command``, replace "Build command" text from ``"make"`` to + ``"${NDKROOT}/ndk-build.cmd"`` on Windows, + + ``"${NDKROOT}/ndk-build"`` on Linux and MacOS. + .. image:: images/eclipse_cdt_cfg4.png :alt: Configure CDT :align: center +#. Move to :guilabel:`Behaviour` tab and change "Workbench build type" section like shown below: + + .. image:: images/eclipse_cdt_cfg5.png + :alt: Configure CDT + :align: center + +#. Press :guilabel:`OK` and make sure the ``ndk-build`` is successfully invoked when building the project. + + .. image:: images/eclipse_cdt_cfg6.png + :alt: Configure CDT + :align: center Debugging and Testing ===================== diff --git a/doc/tutorials/introduction/android_binary_package/images/eclipse_cdt_cfg4.png b/doc/tutorials/introduction/android_binary_package/images/eclipse_cdt_cfg4.png index 55b81df..a9958da 100644 Binary files a/doc/tutorials/introduction/android_binary_package/images/eclipse_cdt_cfg4.png and b/doc/tutorials/introduction/android_binary_package/images/eclipse_cdt_cfg4.png differ diff --git a/doc/tutorials/introduction/android_binary_package/images/eclipse_cdt_cfg5.png b/doc/tutorials/introduction/android_binary_package/images/eclipse_cdt_cfg5.png index fb38633..e4e6f4f 100644 Binary files a/doc/tutorials/introduction/android_binary_package/images/eclipse_cdt_cfg5.png and b/doc/tutorials/introduction/android_binary_package/images/eclipse_cdt_cfg5.png differ diff --git a/doc/tutorials/introduction/android_binary_package/images/eclipse_cdt_cfg6.png b/doc/tutorials/introduction/android_binary_package/images/eclipse_cdt_cfg6.png new file mode 100644 index 0000000..8212ae7 Binary files /dev/null and b/doc/tutorials/introduction/android_binary_package/images/eclipse_cdt_cfg6.png differ