Monday, July 21, 2014

Install and update Android Studio (Beta) on Ubuntu 14.04



Before you set up Android Studio, be sure you have installed JDK 6 or greater (the JRE alone is not sufficient), or Install Oracle JDK 8 on Ubuntu 14.04.

The installation is very straightforward:
  • Download Android Studio Beta v0.8.0 with the Android SDK for Linux HERE.
  • Unpack the downloaded Tar file, android-studio-bundle-.tgz, into an appropriate location for your applications.
  • To launch Android Studio, navigate to the android-studio/bin/ directory in a terminal and execute studio.sh.



Update Android Studio:

If you are running Android Studio 0.8.x, simple restart it, or manually check Help > Check for Update...



Update Android SDK in Android Studio:

- Click Configure

- Click SDK Manager


Setup 51-android.rules for Android SDK

After Install Android SDK on Ubuntu 14.04, you have to setup 51-android.rules, otherwise you cannot connect, download and run your code on real devices.


Refer to the document http://developer.android.com/tools/device.html#setting-up:

- Make sure enable something like Developer options, USB debugging...on your device.

- As root, create/modify the file /etc/udev/rules.d/51-android.rules in your Ubuntu system.

- Add a line in the file
SUBSYSTEM=="usb", ATTR{idVendor}=="xxxx", MODE="0666", GROUP="plugdev"

where xxxx is the vendor id of your device. You can use the Linux command lsusb to get the vendor id of your device, refer 2:05 of the below video to know how to.

- Run the command to execute it:
$ chmod a+r /etc/udev/rules.d/51-android.rules


After setup /etc/udev/rules.d/51-android.rules, you can download and run your apps on real devices.

Install Android SDK on Ubuntu 14.04

Before install Android SDK on Ubuntu, you have to Install Oracle JDK 8 on Ubuntu 14.04.

Visit http://developer.android.com/sdk/index.html, to download Eclipse ADT with the Android SDK for Linux. Simple unzip the downloaded file and move to the folder you want. Simple run the file <installed folder>/eclipse/eclipse to start the Eclipse with Android SDK.

As mentioned in SYSTEM REQUIREMENTS of Android SDK document, JDK 6 is needed. To select Java compiler compliance level:
- click Window in Eclipse menu, -> Preferences.
- Extend Java on left box, and select Compiler.
- Select 1.6 in Compiler compliance level.

Now you can create "Hello World" to verify your setup.



In order to connect your Android SDK to real devices to test your apps, you have to setup 51-android.rules for your devices.

Install Oracle JDK 8 on Ubuntu 14.04

This post describe how to download and install Oracle JDK 8 on Ubuntu 14.04, and also update alternatives to correct the links.

Download Oracle JDK from http://www.oracle.com/technetwork/java/javase/downloads/index.html.

Accept License Agreement and download the corresponding .tar.gz file, jdk-8u11-linux-i586.tar.gz in my case.

Unpack the downloaded tarball (.tar.gz) and move unpacked folder to where you want, /home/u/jdk1.8.0_11/ in my case.

Run the following commands in terminal to update the alternatives of javac and java. Where /home/u/jdk1.8.0_11/ is the installed folder of jdk.

$ sudo update-alternatives --install /usr/bin/javac javac /home/u/jdk1.8.0_11/bin/javac 1
$ sudo update-alternatives --install /usr/bin/java java /home/u/jdk1.8.0_11/bin/java 1

$ sudo update-alternatives --config javac
$ sudo update-alternatives --config java

After installed and setup

Step-by-step:

Sunday, July 20, 2014

Install Cinnamon on Ubuntu 14.04

Against Unity, Cinnamon can seem fairly performance orientated.



To install Cinnamon on Ubuntu 14.04, enter the commands in Terminal:

$ sudo add-apt-repository ppa:lestcape/cinnamon
$ sudo apt-get update
$ sudo apt-get install cinnamon




reference: OMG!Ubuntu! - How to Install Cinnamon from a PPA on Ubuntu 14.04


Note for using RecordMyDesktop on Cinnamon:

By default, the bottom bar will disappear when running RecordMyDesktop to record your screen activity. To fix it, run with Extra Options of --no-frame.

- Click Advanced button.


- Select Misc tab.
- Enter "--no-frame" in Extra Options box.