Install Eclipse
- Download Eclipse Indigo for Java SE developers.
-
Unpack tar into ~/
- Create shortcut on desktop that points at /home/myuser/eclipse/eclipse
-
Install Eclipse Software:
- Git
- Subclipse
- ADT-Plugin (Android)
Download MRL source
Assumes workspace used is "~/workspace"
cd ~/workspace/ &&\ git svn clone http://myrobotlab.googlecode.com/svn/trunk/ myrobotlab
Setup Git
-
If you haven't set up your global Git email yet, do so by running this with your email address you want to use (best bet is to use whatever email address you plan to use with GitHub):
git config\ --global user.email "lowrider@myrobotlab.org"
-
Add a .gitconfig file so that you don't have to worry about files you will never want to check in:
echo ".gitignore android/.settings/ android/bin/ android/gen/ mrlclient/bin/ myrobotlab-tests/bin/ myrobotlab/bin/ " > ~/workspace/myrobotlab/.gitignore
-
Set up your bash so that it includes the current working Git branch when you're in a folder containing a Git repo by adding this to ~/.bash_profile:
parse_git_branch() { git branch 2> /dev/null\ | sed -e '/^[^*]/d' -e 's/* \(.*\)/[ \1 ]/' } PS1="\\w \\[$(tput bold; tput setaf 3)\\]\$(parse_git_branch) \ \\[$(tput sgr0)\\]\\$ \\[$(tput sgr0)\\]"
Gives you:
Import projects
- Open Eclipse
-
Start importing:
- File -> Import...
-
Select the Git method:
- Git -> Projects from Git
- Repository Source: local
-
Git Repository:
- Click the Add... button to the upper-right
- Browse to the location used above (~/workspace/myrobotlab in my case) and select that folder
- Click the Finish button
-
Wizard for importing:
- Use the default selected "Import existing projects". This will import all the projects checked out into the local Git repository.
Initial Hicups
-
Error showing up in Eclipse:
Failed to get the adb version: Cannot run program "/home/myuser/android-sdks/platform-tools/adb" : error=2, No such file or directory from '/home/myuser/android-sdks/platform-tools/adb' - exists=true
Run the command in Terminal to test what is wrong:
~/android-sdks/platform-tools/adb
Result:
Error: /home/myuser/android-sdks/platform-tools/adb : /lib/ld-linux.so.2 : bad ELF interpreter : No such file or directory
Find a suggestion online and try it
sudo yum install glibc.i686
Try it again:
~/android-sdks/platform-tools/adb : error while loading shared libraries : libncurses.so.5 : cannot open shared object file : No such file or directory ~/android-sdks/platform-tools/aapt : error while loading shared libraries : libz.so.1 : cannot open shared object file : No such file or directory
Seems like I'm missing some required 32-bit files
sudo yum install\ ncurses-libs.i686\ libstdc++.i686\ zlib.i686
-
Error showing up in Eclipse:
Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
-
android project compiler complaints (317 errors):
Android cannot be resolved to a type AndroidActivity.java /android/src/org/myrobotlab/android line 30 Java Problem
Possible issue:
import org.myrobotlab.service.Android;
Changed the following for the linked myrobotlab src folder in the android project. From:
WORKSPACE_LOC/myrobotlab/src
To:
WORKSPACE_LOC/myrobotlab/myrobotlab/src
-
mrclient project compiler complaints (139 errors):
CMDLine cannot be resolved to a type MRLClient.java /mrlclient/src/org/myrobotlab/client line 156 Java Problem
Possible issue: mrclient src folder framework isn't linked properly. From:
WORKSPACE_LOC/myrobotlab/src
To:
WORKSPACE_LOC/myrobotlab/myrobotlab/src
-
android project compiler complaints (97 errors):
R cannot be resolved to a variable AndroidActivity.java /android/src/org/myrobotlab/android line 34 Java Problem
This usually shows up if there are Android config issues. This might be related:
The method onAccuracyChanged(Sensor, int) of type Android must override a superclass method Android.java /android/myrobotlab/org/myrobotlab/service line 101 Java Problem
Installed JDK 1.6 (simply download the RPM bin, chmod +x, and ./jdk.bin execute it) and restarted eclipse.
-
android project compiler complaints (22 errors):
The method onAccuracyChanged(Sensor, int) of type Android must override a superclass method Android.java /android/myrobotlab/org/myrobotlab/service line 101 Java Problem
GroG suggests this is because of Android compatibility issues.
Fix: change project settings to use Java Compiler 1.6 instead of 1.5
Install a 1.6 JDK version -
Install a 1.6 JDK version - change the following
JDK 1.6
Changing to 1.6 fixed some of the issues. It's too bad that Android defaults to 1.5.
Holy crap,didn't know it was
Holy crap,
didn't know it was you till I saw the picture :)
I haven't compiled it on 1.7 dunno if there are any errors, flip it to 1.7 and see if anything glows red..
I don't know how to GitHub, I'm still old school....
Its just the Android project bitch'n... "myrobotlab" is the bigger kahuna
Git doesn't need to Hub
http://google-opensource.blogspot.com/2011/07/announcing-git-support-for-google-code.html
I'd have to learn something
I'd have to learn something new though ?!? jeeze didn't even know smiley's worked till now
Getting Runtime Running
Emulator SDL Problem
The following error shows up with I try to run the android project using a 2.3.3 device.
Tried YUM SDL-devel
Tried installing SDL-devel to see if that fixed it:
Did not fix it.
Fixed
Ran the following in order to figure out what was failing:
This pointed me in the direction of libXrandr.so.2 so checked what provides that in YUM:
which, in turn, points me to libXandr (go figure!)
This fixed it so that I can now run the emulator.