Friday, July 25, 2014

Android SDK-Eclipse crash when Content Assist provide suggestion

Recently, install Android SDK on updated Ubuntu 14.04. But it always crash when Content Assist try to provide suggestion. And report error like this:

# A fatal error has been detected by the Java Runtime Environment:
#  SIGSEGV (0xb) at pc=0x6115b86d, pid=4231, tid=3076355840
# JRE version: Java(TM) SE Runtime Environment (8.0_11-b12) (build 1.8.0_11-b12)
# Java VM: Java HotSpot(TM) Client VM (25.11-b03 mixed mode linux-x86 )
# Problematic frame:
# C  []  soup_session_feature_detach+0x1d
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
# An error report file with more information is saved as:
# /home/u/Android/eclipse/hs_err_pid4231.log
# If you would like to submit a bug report, please visit:
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.

This solution work for me:
  • Edit the file <Android SDK-Eclipse folder>/eclipse/eclipse.ini.
  • Insert the line:

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

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

- 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.