Skip to content

Developer Guide (NOT FINISHED)

bherrmann7 edited this page May 7, 2012 · 1 revision

WARNING: THIS GUIDE IS NOT YET FINISHED!!!

CarCast Development - Setup Guide

  1. Install Oracle's "Java SE 6 Update 31"

On Linux,

    $ sudo chmod a+wrx /opt/
    $ mkdir /opt/java
    $ cd /opt/java
    $ # download latest java from java.oracle.com, download shellscript version
    $ bash ~/Downloads/jdk...sh

modify start up script (usually .bash_profile) to define JAVA_HOME and set PATH

   export JAVA_HOME=/opt/java/jdk1.6.0_31
   export PATH=$JAVA_HOME/bin:$PATH

verify everything is correct

$ java -version
   java version "1.6.0_31"
   Java(TM) SE Runtime Environment (build 1.6.0_31-b04)
   Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01, mixed mode)

On 64bit linux, Install 32-bit compat libaries

    $ sudo apt-get install ia32-libs
  1. Download and install the Android SDK http://developer.android.com/sdk/index.html On Linux,

$ mkdir /opt/android $ cd /opt/android $ wget http://dl.google.com/android/android-sdk_r18-linux.tgz $ tar xvfz android-sdk_r18-linux.tgz

  1. Download "Eclipse IDE for Java Developers" from http://www.eclipse.org/downloads/

On 64bit Linux,

    $ mkdir /opt/eclipse
    $ cd /opt/eclipse 
    $ wget -O e.tgz 'http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/indigo/SR2/eclipse-java-indigo-SR2-linux-gtk-x86_64.tar.gz&url=http://mirror.cc.vt.edu/pub/eclipse/technology/epp/downloads/release/indigo/SR2/eclipse-java-indigo-SR2-linux-gtk-x86_64.tar.gz&mirror_id=504' 
    $ tar xvfz e.tgz
    $ mv eclipse indigo
    $ ln -s indigo latest
  1. Run Eclipse and install ADP plugin

On Linux,

    $ /opt/eclipse/latest/eclipse
a. I use "/home/bob/workspace" as my workspace (and check the chebox "Use this as default..."
b. click on the "workbench" icon
c. On the "Help" menu choose "Install New Software"
d. On the "Work with:" field paste "https://dl-ssl.google.com/android/eclipse/" and hit enter
e. check the box next to "Developer Tools"
f. Next > Next > Radio Box > Finish ... "Restart Now"
  1. Install Git plugin

    a. In Eclipse on the "Help" menu choose "Install New Software" b. On the "Work with:" field paste "http://download.eclipse.org/egit/updates" c. check off both boxes and "next", check I accept, finish... "Restart Now"

  2. Configure Android SDK location inside eclipse

    a. In eclipse, Window / Preferences / Android b. for SDK location fill in "/opt/android/android-sdk-linux" c. choose "Open SDK Manager", 7 packages should be automatically selected d. click button labeled "Install 7 packages..."

  3. Check out Car Cast

On Linux,

    $ cd ~
    $ git clone git://github.com/bherrmann7/Car-Cast.git cc    
  1. Create new Android project in Eclipse

    a. File / New / Project ... b. Android / Android Project / Next > c. for project name use "cc", choose radio "Create from existing source" d. give location as "/home/bob/cc/cc" (not the double cc/cc is intended) e. click "Finish" d. If you get "50" errors, right click on project, Choose Properties / Java Compile and set "Compiler compliance level" to "1.6" f. click on the dropdown triangle next to the "bug" on the eclipse tool bar e. click on the text "Android Application", then click the "new icon" (white block with yellow plus in the upper right) g. name "car cast", project "CarCast" h. click the target tag, and choose Manual, click "Debug"

  2. to run on your phone, you need to enable "developer debug mode" on the phone, and for linux enter the right udev settings. http://developer.android.com/guide/developing/device.html