CHUVASH.eu

CHunky Universe of Vigourous Astonishing SHarepoint :)

Install android sdk and eclipse in Ubuntu 12.04

Download and unpack the Android SDK, move it to your home folder. I prefer to set a point in front of the directory folder to make it be hidden so that my home directoy still looks tidy: .android-sdk-linux.

Then add this to your path:

export PATH=${PATH}:~/.android-sdk-linux/tools:~/.android-sdk-linux/platform-tools

.android-sdk-tools is for running android command, and .android-sdk-tools/platform-tools is for running adb command
And add it to your .bashrc-file so that this path is loaded automatically when you log on.

echo -e '\nexport PATH=${PATH}:~/.android-sdk-linux/tools:~/.android-sdk-linux/platform-tools' >> ~/.bashrc

After that you have to install eclipse (so you even get the latest java development kit jdk).

sudo apt-get install eclipse

Android people recommend to install in that order. If you install eclipse before adt, you maybe don’t find adt in eclipse, as I did. To solve this, uninstall eclipse and remove the folders ~/.eclipse and ~/workspace. Then install eclipse again and add adt to eclipse.

Then from command-line rund android and install all the need packages:

In Eclipse install adt.

Ubuntu 64 bit

Android SDK is only available in 32 bit. If your Ubuntu is 64 bit, you have to install an additional package:

sudo apt-get install ia32-libs

Wonder if you have 32 bit or 64 bit Ubuntu, just find out in command line:

dpkg --print-architecture
Debug on your device

Follow the steps for attaching to your android devic on android developers site. To enable debugging on LG, e.g. run this:

sudo echo 'SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666", GROUP="plugdev"' > /etc/udev/rules.d/51-android.rules
sudo chmod a+r /etc/udev/rules.d/51-android.rules
Version control

Just install git and add a new ssh key:

sudo apt-get install git
PhoneGap

Want to have your web apps as native android apps, see the PhoneGap. A real world example could be wikipedia mobile.

Updating the SDK

Edit 2014-01-03: Now when KitKat is available, I have updated the SDK through the command line:

android update sdk --no-ui
Advertisements

15 responses to “Install android sdk and eclipse in Ubuntu 12.04

  1. Aario 2012-06-06 at 19:33

    Is it real? I mean right after running ./android command, it shows error downloading packages and no one on the internet got a solution for it. It tried several times but never made it work downloading necessary packages! 😦

    • Anatoly Mironov 2012-06-06 at 19:54

      It is weird. I have heard about this issue after I have installed. But it worked for me directly. I must mention I installed eclipse with apt-get and it was a really clean Ubuntu Precise installation. I’ll leave a message in this comment thread if I found some solution.

    • Vemman 2012-08-01 at 02:49

      are you sure your command is right.
      “./” part says android executable is in current directory. since its on your path (assuming you followed this tut) just “android” (without quotes ofcourse) is sufficient. or if you didn’t set path and android-sdk is in your home directory
      ~/android-sdk/platform-tools/android

      • Anatoly Mironov 2012-08-01 at 07:48

        Good observation! Thank you, I hope Aario solves his problems.

      • Francisco Marzoa 2012-09-22 at 20:24

        Well, he stands clearly that ” it shows error DOWNLOADING packages”, so for me it is pretty clear that he is executing the command ./android within the RIGHT directory. Probably it was a transitory connectivity problem, in his point or with Google servers, that I hope he has solved yet four months after… X-D

  2. Sean 2012-06-12 at 12:00

    Very simple and clear instructions, thanks Anatoly B-)

  3. Theophilo Oliveira Damião 2012-10-13 at 00:37

    Dude, thanks for this excelent article but I have been in trouble since to start SDK manager. It says “he AVD manager normally uses the user’s profile directory to store AVD files. However it failed to find the default profile directory. To fix this, please set the environment variable ANDROID_SDK_HOME to a valid path such as “~”.

    I did just like you said.

    • Anatoly Mironov 2012-10-16 at 00:36

      Glad you liked it. How dit it then? Does it work now? “To fix this, please set the environment variable ANDROID_SDK_HOME to a valid path such as “~”.” , is this an error you get, or is a tip for this blog post?

    • Anatoly Mironov 2012-10-21 at 23:49

      Hi Theo! Huh, I am glad you found a solution. Thanks for sharing and linking to a solution!

  4. Roman 2012-11-15 at 01:18

    Hmm… no android showing in preferences( What could be the problem. Folowed everything what says in article.

  5. John Burden 2013-06-25 at 23:47

    ch_color_title = “0000CC”;

  6. RonaldDymn 2013-12-26 at 20:43

    My name is Ronald. Am new here. Am getting a lot of help from this forum.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Discovering SharePoint

And having fun doing it

Bram de Jager talking Office 365, SharePoint and Azure

My view and thoughts on Productivity and more.

My programming life

and everything in between

SharePoint Development Lab by @avishnyakov

It is a good place to share some SharePoint stories and development practices.

SharePoint Dragons

Nikander & Margriet on SharePoint

RealActivity - Real-time and trustworthy

Blog site of founder, RealActivty - Paul J. Swider

Mai Omar Desouki - Avid SharePointer

Egyptian & Vodafoner - Senior SharePoint Consultant

Cameron Dwyer | Office 365, SharePoint, Outlook, OnePlace Solutions

Office 365, SharePoint, OnePlace Solutions & Life's Other Little Wonders

paul.tavares

Me and My doings!

Share SharePoint Points!!

By Mohit Vashishtha

Jimmy Janlén "Den Scrummande Konsulten"

Erfarenheter, synpunkter och raljerande om Scrum från Jimmy Janlén

SPJoel

SharePoint for everyone

SharePointRyan

Ryan Dennis is a SharePoint Solution Architect with a passion for SharePoint and PowerShell

SharePoint 2020

The Vision for a Future of Clarity

Aharoni in Unicode, ya mama

Treacle tarts for great justice

... And All That JS

JavaScript, Web Apps and SharePoint

blksthl

Mostly what I know about SharePoint - CommunicoCuspis

%d bloggers like this: