catkin_make android_core SDK Directory does not exist

asked 2018-07-10 19:09:23 -0600

XCrimson gravatar image

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!

edit retag flag offensive close merge delete

Comments

try catkin_make clean && catkin_make

pengjiawei gravatar image pengjiawei  ( 2018-07-10 20:35:49 -0600 )edit

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.

XCrimson gravatar image XCrimson  ( 2018-07-10 21:14:43 -0600 )edit

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

jubeira gravatar image jubeira  ( 2018-07-12 07:58:11 -0600 )edit

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?

XCrimson gravatar image XCrimson  ( 2018-07-14 08:46:49 -0600 )edit

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.

jubeira gravatar image jubeira  ( 2018-07-17 08:29:11 -0600 )edit

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"

DRSX gravatar image DRSX  ( 2018-09-16 04:41:07 -0600 )edit

@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?

jubeira gravatar image jubeira  ( 2018-09-17 12:45:56 -0600 )edit