Install Android Studio in Ubuntu 14

I have installed eclipse for C++ development and Java development in Ubuntu 14.04.
But these days, I prefer to install the android development environment。

Compared to Eclipse, Android Studio offers official development environment.
So I install this software.

I have already installed Java 1.8.

Reference:
1.http://karuppuswamy.com/wordpress/2013/10/23/how-to-install-android-studio-in-ubuntu-linux-13-10/
2.http://simpledeveloper.com/adb-not-responding-android-solution/
3.http://blog.csdn.net/niuls/article/details/37868079


The steps to install Android Studio.

Step 1: Download Android Studio from Android Developer Portal(developer.android.com/sdk/index.html).

Step 2: Install Android Studio.
Extracting the the downloaded package to /opt/.
Because of the China Gov's firewall, the google's host address should be added.
For example, You can find google's host address in this site(http://ping.chinaz.com/) and add an effective one to /etc/hosts
$ sudo vi /etc/hosts.
and add the address and the site domain to the file.

Then start install.
Use the Android Studio's executive file, enter the document named "/opt/android_studio/bin"
$ sudo ./studio.sh
The program will start install the Android SDK and Android Studio.

Step 3: After installation, the Android Studio Setup Program shows:Unable to create Android virtual device

Maybe that means the adb not work or the Image System do not work.

Open the Android Studio, I find the SDK did not work and the adb(Android Debug Bridge) did not start.
So I googled the problems.
There are lots of useless answers and out-of-date answers.
My method to solve this problem:
a. add the adb to the environment variable:
add this code to the /etc/profile
# android SDK
export ANDROID_PATH=/opt/android-studio
export ANDROID_SDK=/home/yourname/Android
export PATH=$PATH:${ANDROID_PATH}/bin:${ANDROID_SDK}/sdk/platform-tools


b.due to the adb is 32 bits program, we should install the 64 bits library
b1.The right apt-get:
$ sudo apt-get update
$ sudo apt-get install lib32z1
$ sudo apt-get install lib32bz2-1.0
$ sudo apt-get install lib32stdc++6
b2.The old apt-get(From blog, useless):
$ sudo apt-get install lib32ncurses5 ia32-libs
because the ia32-libs is too old to the Ubuntu 14.

Comments

Popular posts from this blog

How to install Cursor in Ubuntu

Build JupyterNotebook(Anaconda) environment in AWS EC2

How to buy Tokyo Disneyland tickets at a cheaper price. (Japanese)