Tuesday, July 22, 2014

"Hello World" try on Android Studio

This video try "Hello World" on Android Studio:

Linux All-in-One For Dummies, 5th Edition

Eight minibooks in one volume cover every important aspect of Linux and everything you need to know to pass level-1 certification

Linux All-in-One For Dummies (For Dummies (Computer/Tech))

Linux All-in-One For Dummies explains everything you need to get up and running with the popular Linux operating system. Written in the friendly and accessible For Dummies style, the book ideal for new and intermediate Linux users, as well as anyone studying for level-1 Linux certification. The eight minibooks inside cover the basics of Linux, interacting with it, networking issues, Internet services, administration, security, scripting, and level-1 certification.
  • Covers every major topic for anyone just getting familiar with Linux
  • Includes a test-prep section for passing the level-1 Linux certification exam
  • Written by the expert author of more than thirty books, including CompTIA Security+ Study Guide, 3rd Edition
Including everything beginners need to know to get started with Linux, Linux All-in-One For Dummies, 5th Edition is the ultimate resource and reference for aspiring professionals.

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.