Robotics StackExchange | Archived questions

Problem installing android_core on Ubuntu 14.04, ROS indigo

Hi, I am trying to install android_core ... but im getting an error .... here is some background info

I had already installed Android Studio on Ubuntu 14.04 ... the full studio and not the stand alone SDK .... and it is working fine, but only from the IDE, and not in combination with ROS (I was still learning Android) .. everything works just fine now .. updates, using app in the phone, using app in the emulator, deployment, everything.

I also had already installed ROS indigo ... and also everything works just fine .. i also have my Turtlebot, and all its apps and related packages works just fine as well .. through launches or romocon

NOW .. i want to combine them both .. that is develop Android apps for ROS .. so i following the installation instructions on this link ... here is wht i did:

1. Prerequisites:

Since i already have Android Studio & Java JDK .. it was just a matter of setting the env to the installation locations ... here is what i put in the .bashrc

 export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/jre

export PATH=${PATH}:~/Android/Sdk/tools:~/Android/Sdk/platform-tools:~/android-studio/bin

export ANDROID_HOME=~/android-studio

"Yes ... these locations are weird .. but this is where i had already installed my Android Studio ... will this cause a problem?"

2. Source Installation of Java

I followed the instructions on this link "3.1 - Core installation" .. and it worked just fine

3. Source Installation of android_core:

I followed the instructions on this link "4.1 - Core Installation" ... and here is where the problems started ... all went well till the last command ... here is what happened:

samihajjaj@sami:~/android_core$ catkin_make
Base path: /home/samihajjaj/android_core
Source space: /home/samihajjaj/android_core/src
Build space: /home/samihajjaj/android_core/build
Devel space: /home/samihajjaj/android_core/devel
Install space: /home/samihajjaj/android_core/install
####
#### Running command: "make cmake_check_build_system" in "/home/samihajjaj/android_core/build"
####
####
#### Running command: "make -j4 -l4" in "/home/samihajjaj/android_core/build"
####

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':android_15'.
> Could not resolve all dependencies for configuration ':android_15:_debugCompile'.
   > Could not find com.android.support:support-v4:21.0.3.
     Searched in the following locations:
         file:/home/samihajjaj/android_core/devel/share/maven/com/android/support/support-v4/21.0.3/support-v4-21.0.3.pom
         file:/home/samihajjaj/android_core/devel/share/maven/com/android/support/support-v4/21.0.3/support-v4-21.0.3.jar
         file:/home/samihajjaj/rosjava/devel/share/maven/com/android/support/support-v4/21.0.3/support-v4-21.0.3.pom
         file:/home/samihajjaj/rosjava/devel/share/maven/com/android/support/support-v4/21.0.3/support-v4-21.0.3.jar
         file:/opt/ros/indigo/share/maven/com/android/support/support-v4/21.0.3/support-v4-21.0.3.pom
         file:/opt/ros/indigo/share/maven/com/android/support/support-v4/21.0.3/support-v4-21.0.3.jar
         https://github.com/rosjava/rosjava_mvn_repo/raw/master/com/android/support/support-v4/21.0.3/support-v4-21.0.3.pom
         https://github.com/rosjava/rosjava_mvn_repo/raw/master/com/android/support/support-v4/21.0.3/support-v4-21.0.3.jar
         file:/home/samihajjaj/.m2/repository/com/android/support/support-v4/21.0.3/support-v4-21.0.3.pom
         file:/home/samihajjaj/.m2/repository/com/android/support/support-v4/21.0.3/support-v4-21.0.3.jar
         http://repository.springsource.com/maven/bundles/release/com/android/support/support-v4/21.0.3/support-v4-21.0.3.pom
         http://repository.springsource.com/maven/bundles/release/com/android/support/support-v4/21.0.3/support-v4-21.0.3.jar
         http://repository.springsource.com/maven/bundles/external/com/android/support/support-v4/21.0.3/support-v4-21.0.3.pom
         http://repository.springsource.com/maven/bundles/external/com/android/support/support-v4/21.0.3/support-v4-21.0.3.jar
         https://repo1.maven.org/maven2/com/android/support/support-v4/21.0.3/support-v4-21.0.3.pom
         https://repo1.maven.org/maven2/com/android/support/support-v4/21.0.3/support-v4-21.0.3.jar
     Required by:
         org.ros.android_core:android_15:0.2.0

* 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: 14.409 secs
make[2]: *** [android_core/CMakeFiles/gradle-android_core] Error 1
make[1]: *** [android_core/CMakeFiles/gradle-android_core.dir/all] Error 2
make: *** [all] Error 2
Invoking "make -j4 -l4" failed

I am not operating under Proxy .. if that was an issue ...

I've been battling this for few days already .. i could really use a help ... thanks a lot in advance

Asked by samiSH on 2015-10-06 03:36:38 UTC

Comments

Answers

well .. I found the solution to the problem above .. apparently ... and for some reason that i do not know yet .. catkin was looking at the wrong places to where the support files were ... so to solve the problem above .. ull need to define a new env. variable in ur bash file .. that variable will tell catkin where the support files are on ur system .. here is how:

in ur .bashrc file ... add either one the following lines below ..

export ROS_MAVEN_REPOSITORY=(location to where the support files are on ur system)

export ROS_MAVEN_PATH=(location to where the support files are on ur system)

either line will do the trick as catkin will first look for the ROS_MAVEN_REPOSITORY variable, then the ROS_MAVEN_PATH ... and it doesnt really hurt to put them both

NOTE: I cant chose my own answer as correct because i dont have enough points

Asked by samiSH on 2015-10-06 23:19:53 UTC

Comments