提交 54f96f04 编写于 作者: A Andrey Kamaev

Merge pull request #134 from apavlenko/android-tutorial

...@@ -37,10 +37,11 @@ following key topis: ...@@ -37,10 +37,11 @@ following key topis:
Quick environment setup for Android development Quick environment setup for Android development
=============================================== ===============================================
If you are making a clean environment install, then you can try If you are making a clean environment install, then you can try `Tegra Android Development Pack <https://developer.nvidia.com/tegra-android-development-pack>`_
`Tegra Android Development Pack <http://developer.nvidia.com/mobile/tegra-android-development-pack>`_
(**TADP**) released by **NVIDIA**. (**TADP**) released by **NVIDIA**.
.. note:: Starting the *version 2.0* the TADP package includes *OpenCV for Tegra* SDK that is a regular *OpenCV4Android SDK* extended with Tegra-specific stuff.
When unpacked, TADP will cover all of the environment setup automatically and you can skip the rest of the guide. When unpacked, TADP will cover all of the environment setup automatically and you can skip the rest of the guide.
If you are a beginner in Android development then we also recommend you to start with TADP. If you are a beginner in Android development then we also recommend you to start with TADP.
...@@ -124,20 +125,18 @@ You need the following software to be installed in order to develop for Android ...@@ -124,20 +125,18 @@ You need the following software to be installed in order to develop for Android
You need the following SDK components to be installed: You need the following SDK components to be installed:
* *Android SDK Tools, revision 14* or newer. * *Android SDK Tools, revision 20* or newer.
Older revisions should also work, but they are not recommended. Older revisions should also work, but they are not recommended.
* *SDK Platform Android 3.0*, ``API 11`` and *Android 2.3.1*, ``API 9``. * *SDK Platform Android 3.0* (``API 11``).
The minimal platform supported by OpenCV Java API is **Android 2.2** (``API 8``). This is also The minimal platform supported by OpenCV Java API is **Android 2.2** (``API 8``). This is also
the minimum API Level required for the provided samples to run. the minimum API Level required for the provided samples to run.
See the ``<uses-sdk android:minSdkVersion="8"/>`` tag in their **AndroidManifest.xml** files. See the ``<uses-sdk android:minSdkVersion="8"/>`` tag in their **AndroidManifest.xml** files.
But for successful compilation of some samples the **target** platform should be set to But for successful compilation the **target** platform should be set to Android 3.0 (API 11) or higher. It will not prevent them from running on Android 2.2.
Android 3.0 (API 11) or higher. It will not prevent them from running on Android 2.2.
.. image:: images/android_sdk_and_avd_manager.png .. image:: images/android_sdk_and_avd_manager.png
:height: 500px
:alt: Android SDK Manager :alt: Android SDK Manager
:align: center :align: center
...@@ -178,7 +177,13 @@ You need the following software to be installed in order to develop for Android ...@@ -178,7 +177,13 @@ You need the following software to be installed in order to develop for Android
:guilabel:`Developer Tools` and click :guilabel:`Next`. :guilabel:`Developer Tools` and click :guilabel:`Next`.
#. In the next window, you'll see a list of the tools to be downloaded. Click :guilabel:`Next`. #. In the next window, you'll see a list of the tools to be downloaded. Click :guilabel:`Next`.
.. TODO: Here we need user to check the presence of CDT plugin. .. note:: If you also plan to develop native C++ code with Android NDK don't forget to
enable `NDK Plugins` installations as well.
.. image:: images/eclipse_inst_adt.png
:alt: ADT installation
:align: center
#. Read and accept the license agreements, then click :guilabel:`Finish`. #. Read and accept the license agreements, then click :guilabel:`Finish`.
...@@ -213,15 +218,24 @@ You need the following software to be installed in order to develop for Android ...@@ -213,15 +218,24 @@ You need the following software to be installed in order to develop for Android
There are several possible ways to integrate compilation of C++ code by Android NDK into Eclipse There are several possible ways to integrate compilation of C++ code by Android NDK into Eclipse
compilation process. We recommend the approach based on Eclipse compilation process. We recommend the approach based on Eclipse
:abbr:`CDT(C/C++ Development Tooling)` Builder. :abbr:`CDT(C/C++ Development Tooling)` Builder.
.. note:: If you're using the latest ADT plugin for Eclipse (version 20 and above), most likely
that you already have the CDT plugin. If it is so, just skip this section.
Make sure your Eclipse IDE has the :abbr:`CDT(C/C++ Development Tooling)` plugin Make sure your Eclipse IDE has the :abbr:`CDT(C/C++ Development Tooling)` plugin
installed. Menu :guilabel:`Help -> About Eclipse SDK -> Installation Details`. installed. Menu :guilabel:`Help -> About Eclipse SDK -> Installation Details`.
.. image:: images/eclipse_inst_details.png .. image:: images/eclipse_about_cdt_0.png
:alt: Eclipse About :alt: CDT in Eclipse About
:align: center
..
.. image:: images/eclipse_about_cdt_1.png
:alt: CDT in Eclipse About
:align: center
.. note:: If you're using the latest ADT plugin for Eclipse (version 20 and above), most likely
you already have the CDT plugin and don't need to install it.
.. image:: images/eclipse_about_cdt_1.png
:alt: CDT in Eclipse About
:align: center :align: center
To install the `CDT plugin <http://eclipse.org/cdt/>`_ use menu To install the `CDT plugin <http://eclipse.org/cdt/>`_ use menu
...@@ -656,4 +670,4 @@ What's next ...@@ -656,4 +670,4 @@ What's next
=========== ===========
Now, when you have your development environment set up and configured, you may want to proceed to Now, when you have your development environment set up and configured, you may want to proceed to
installing OpenCV4Android SDK. You can learn how to do that in a separate :ref:`O4A_SDK` tutorial. installing OpenCV4Android SDK. You can learn how to do that in a separate :ref:`O4A_SDK` tutorial.
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册