ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

catkin_make build failed kinetic android

asked 2018-11-15 14:37:43 -0500

luischd gravatar image

updated 2018-11-15 16:18:12 -0500

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 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.
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 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.

    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
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-11-20 06:42:37 -0500

jubeira gravatar image

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).

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2018-11-15 14:37:43 -0500

Seen: 350 times

Last updated: Nov 20 '18