0
$\begingroup$

Rosanswers logo

Hi, I'm trying to install Android along with kinetic ROS on Linux 16.04 LTS.

Once I get to the "catkin_make" step the build fails. I'm following this tutorial http://wiki.ros.org/android/Tutorials/kinetic/Installation%20-%20ROS%20Development%20Environment getting stuck on the last step of 3.1.

The first thing that failed was the address of my java directory. So I have to change it every time with export JAVA_HOME="/usr/lib/jvm/java-8-oracle/jre/ after that when I use the catkin_make the build starts and suddenly fails like this.

luis@luischd:~/android_core$ catkin_make
Base path: /home/luis/android_core
Source space: /home/luis/android_core/src
Build space: /home/luis/android_core/build
Devel space: /home/luis/android_core/devel
Install space: /home/luis/android_core/install
####
#### Running command: "make cmake_check_build_system" in "/home/luis/android_core/build"
####
    ####

#### Running command: "make -j4 -l4" in "/home/luis/android_core/build"
####
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
        at build_238rznishtaj5ln8ltl852uvm.run(/home/luis/android_core/src/android_core/build.gradle:25)
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory.  It is currently set to /opt/android-sdk/ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':android_10'.
> The SDK directory '/opt/android-sdk' does not exist.


 
        * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
  

  


  BUILD FAILED
    Total time: 1.507 secs
    android_core/CMakeFiles/gradle-android_core.dir/build.make:57: fallo en las instrucciones para el objetivo 'android_core/CMakeFiles/gradle-android_core'
    make[2]: *** [an

droid_core/CMakeFiles/gradle-android_core] Error 1
CMakeFiles/Makefile2:447: fallo en las instrucciones para el objetivo 'android_core/CMakeFiles/gradle-android_core.dir/all'
make[1]: *** [android_core/CMakeFiles/gradle-android_core.dir/all] Error 2
    Makefile:138: fallo en las instrucciones para el objetivo 'all'

make: *** [all] Error 2
Invoking "make -j4 -l4" failed

Originally posted by luischd on ROS Answers with karma: 18 on 2018-11-15

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

If you are building for Android, you will need Android SDK.

You can download SDK versions inside Android Studio, which is the standard tool for developing apps. From the error, you need SDK version 10 to build it. On top of that, there's an environment variable that should point to where the SDK is installed, which is ANDROID_HOME. Be sure to set it properly to where you have your SDK installed (e.g. export ANDROID_HOME=/home/user/Android/Sdk).


Originally posted by jubeira with karma: 1054 on 2018-11-20

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.