Installing android-sdk from prebuilt binaries

Here is the link for downloading latest android-sdk version from the website:

https://developer.android.com/studio/index.html#downloads

You only need to download the Android tools for building android-ros apps:

Figure 23: Standalone Android SDK

You can download and extract this into the home folder, and you have to set up environment variables to access the SDK tools.

Let's look at the variables you have to append on your .bashrc file. You can set them using the following commands.

Here is how we set the ANDROID_HOME variable, which is required while building android-ros applications. You can set your own SDK location here:

    $ export ANDROID_HOME=~/android-sdk-linux

This command will help you access Android commands from bash:

    $ export PATH=${PATH}:~/android-sdk-linux/tools
    $ export PATH=${PATH}:~/android-sdk-linux/platform-tools

To run those Android commands, we also need to install the 32-bit Ubuntu libraries. It is required for running most Android tool commands.

We can install it using the following command:

    $ sudo dpkg --add-architecture i386
    $ sudo apt-get update
    $ sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386

You can also refer to the following instructions to set android-sdk in Linux:

https://developer.android.com/studio/install.html?pkg=tools

Congratulations, you are almost there!

Now, you can run the following command to start Android SDK manager:

    $ android

From the pop-up window, you have to install the following Android platforms and their build tools to make the ROS-Android interface work:

Figure 24: Android SDK manager

Here is the list of things you may need to install in Android SDK manager:

  • SDK Platforms
    • Android 2.3.3 (API 10)
    • Android 4.0.3 (API 15)
    • Android 5.0.1 (API 21)
    • Android 6.0 (API 23)
  • Android SDK Build-tools
    • Revision: 19.1
    • Revision: 20
    • Revision: 21.1.2
    • Revision: 22.0.1
    •  Revision: 23.0.1
  • Android SDK Platform-tools
    • Revision: 23.0.1
  • Android SDK Tools
    • Revision: 24.2

Your configuration may vary; this was the configuration used to build the apps for this section.

With this, we should have met all the dependencies for the Android-ROS interface.

Let's clone the Android-ROS source code.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.216.163