Difference between revisions of "MAP524/DPS924 Lab 1"

From CDOT Wiki
Jump to: navigation, search
(Part A: Setting up Android Studio on Linux)
Line 13: Line 13:
 
<li value="5"> At this point you should be able to install any updates, if there are any, by clicking "Check for updates" at the bottom of the window.</li>
 
<li value="5"> At this point you should be able to install any updates, if there are any, by clicking "Check for updates" at the bottom of the window.</li>
 
<li> You can now close Android Studio.</li>
 
<li> You can now close Android Studio.</li>
 +
</ol>
 +
 +
== Part B: Configure your environment ==
 +
 +
<ol>
 +
<li>In a terminal window, edit your .bashrc file to set your PATH and other environment variables.</li>
 +
<pre>export PATH=/home/$USER/android-studio/gradle/gradle-2.2.1/bin:$PATH:/home/$USER/Android/Sdk/tools:/home/$USER/Android/Sdk/platform-tools:/home/$USER/bin
 +
export ANDROID_SDK_HOME=/home/$USER/Android/Sdk
 +
export HISTTIMEFORMAT='%F %T '
 +
export HISTSIZE=2000</pre>
 +
<li>You should now be able to run the gradle command without the ./ prefix. Try running this command to verify:</li>
 +
<pre>gradle -h</pre>
 
</ol>
 
</ol>

Revision as of 13:53, 30 June 2015

Lab 1: Build an Android App with Gradle

Part A: Setting up Android Studio on Linux

  1. Download the latest version of Android Studio.
  2. Unzip the file. You should get a directory named "android-studio".
  3. In a terminal step into the android-studio/bin directory and run the "studio.sh" script.
  4. Follow the instructions and install Android Studio. You should end up with something like this:

Android-studio-setuo-complete.png

  1. At this point you should be able to install any updates, if there are any, by clicking "Check for updates" at the bottom of the window.
  2. You can now close Android Studio.

Part B: Configure your environment

  1. In a terminal window, edit your .bashrc file to set your PATH and other environment variables.
  2. export PATH=/home/$USER/android-studio/gradle/gradle-2.2.1/bin:$PATH:/home/$USER/Android/Sdk/tools:/home/$USER/Android/Sdk/platform-tools:/home/$USER/bin
    export ANDROID_SDK_HOME=/home/$USER/Android/Sdk
    export HISTTIMEFORMAT='%F %T '
    export HISTSIZE=2000
  3. You should now be able to run the gradle command without the ./ prefix. Try running this command to verify:
  4. gradle -h