Robotics StackExchange | Archived questions

catkin_make android_core SDK Directory does not exist

Hello,I'm new to ROS/Linux.I'm trying to start developing android apps for ros, I've followed these (ROS,rosjava and Android Studio) tutorials and now I'm stuck at android_core part.

When I try catkin_make I get the following error:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':android_10'.
> The SDK directory '/home/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: 2.391 secs
android_core/CMakeFiles/gradle-android_core.dir/build.make:57: recipe for target 'android_core/CMakeFiles/gradle-android_core' failed
make[2]: *** [android_core/CMakeFiles/gradle-android_core] Error 1
CMakeFiles/Makefile2:447: recipe for target 'android_core/CMakeFiles/gradle-android_core.dir/all' failed
make[1]: *** [android_core/CMakeFiles/gradle-android_core.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j4 -l4" failed

SDK tools are installed at /home/alex/Android/Sdk.SDK Manager on Android Studio points at the correct file already,and I have downloaded all the nessecery sdk tools.I've also tried doing ANDROID_HOME=/home/Alex/Android/Sdk but I still get the same error.

Thanks in advance!

Asked by XCrimson on 2018-07-10 19:07:41 UTC

Comments

try catkin_make clean && catkin_make

Asked by pengjiawei on 2018-07-10 20:35:49 UTC

Hello!

I now get

 Execution failed for task ':android_10:processReleaseResources'.
> java.io.IOException: Cannot run program "/home/alex/Android/Sdk/build-tools/21.1.2/aapt": error=2, No such file or directory

I checked Android Studio though,and they seem to be installed.

Asked by XCrimson on 2018-07-10 21:14:43 UTC

did you check that the file effectively exists in that directory? Did you install the correct build tools version in Android Studio?

Asked by jubeira on 2018-07-12 07:58:11 UTC

Yes,everything is where it's supposed to be.I even reinstalled android studio but that didn't fix it.Could it be that I'm using kinetic instead of indigo?

Asked by XCrimson on 2018-07-14 08:46:49 UTC

No, I don't think so. What build tools version did you install? Note that Android Studio usually downloads the latest ones, which may be incompatible with android_core.

Asked by jubeira on 2018-07-17 08:29:11 UTC

Hello. I met the same problem. And I finally solve it by change the .bashrc file by replacing "export ANDROID_HOME=$PATH:/home/Android/Sdk" by "export ANDROID_HOME=/home/Android/Sdk"

Asked by DRSX on 2018-09-16 04:41:07 UTC

@DRSX I think that could be a possible accepted answer. Would you like to add it as an answer so that others can benefit from it?

Asked by jubeira on 2018-09-17 12:45:56 UTC

Answers