Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio - how to install Android platform tools on Ubuntu 14.04 64 bit?

I am trying to install Android Studio on a 64 bit version of Ubuntu 14.04. However my installation stops at this point:

enter image description here

How can this be resolved ? Any suggestions or a solution itself would be most appreciated. Thank you very much for your time.

Edit: Am I on the right track when I assume that this has something to do with the lack of 32 bit binaries on a 64 bit version of Ubuntu ? I tried logging in as root repeated the installation process, however the issue still persists. What am I doing wrong ? Is there an alternative way of installing platform tools ? Also, this is what my terminal tells me:

[  26263]  ERROR - tRunWizard$SetupProgressStep$1 - platform-tools, tools and 7 more SDK components were not installed 
com.android.tools.idea.welcome.WizardException: platform-tools, tools and 7 more SDK components were not installed
    at com.android.tools.idea.welcome.InstallOperation.promptToRetry(InstallOperation.java:109)
    at com.android.tools.idea.welcome.InstallComponentsOperation.perform(InstallComponentsOperation.java:80)
    at com.android.tools.idea.welcome.InstallComponentsOperation.perform(InstallComponentsOperation.java:38)
    at com.android.tools.idea.welcome.InstallOperation$1.compute(InstallOperation.java:80)
    at com.android.tools.idea.welcome.InstallContext$Wrapper.run(InstallContext.java:127)
    at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
    at com.android.tools.idea.welcome.ProgressStep.run(ProgressStep.java:167)
    at com.android.tools.idea.welcome.InstallContext.run(InstallContext.java:77)
    at com.android.tools.idea.welcome.InstallOperation.execute(InstallOperation.java:72)
    at com.android.tools.idea.welcome.InstallOperation$OperationChain.perform(InstallOperation.java:151)
    at com.android.tools.idea.welcome.InstallOperation.execute(InstallOperation.java:68)
    at com.android.tools.idea.welcome.InstallOperation$OperationChain.perform(InstallOperation.java:149)
    at com.android.tools.idea.welcome.InstallOperation.execute(InstallOperation.java:68)
    at com.android.tools.idea.welcome.InstallOperation$OperationChain.perform(InstallOperation.java:149)
    at com.android.tools.idea.welcome.InstallOperation.execute(InstallOperation.java:68)
    at com.android.tools.idea.welcome.InstallComponentsPath.runLongOperation(InstallComponentsPath.java:301)
    at com.android.tools.idea.welcome.FirstRunWizard.doLongRunningOperation(FirstRunWizard.java:126)
    at com.android.tools.idea.welcome.FirstRunWizard.access$000(FirstRunWizard.java:41)
    at com.android.tools.idea.welcome.FirstRunWizard$SetupProgressStep$1.run(FirstRunWizard.java:160)
    at com.android.tools.idea.welcome.FirstRunWizardHost$LongRunningOperationWrapper.run(FirstRunWizardHost.java:432)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:471)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:178)
    at com.intellij.openapi.progress.ProgressManager.executeProcessUnderProgress(ProgressManager.java:209)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:212)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:171)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl$8.run(ProgressManagerImpl.java:380)
    at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:419)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
    at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:149)
[  26271]  ERROR - tRunWizard$SetupProgressStep$1 - Android Studio 1.1.0  Build #AI-135.1740770 
[  26277]  ERROR - tRunWizard$SetupProgressStep$1 - JDK: 1.7.0_75 
[  26277]  ERROR - tRunWizard$SetupProgressStep$1 - VM: Java HotSpot(TM) 64-Bit Server VM 
[  26277]  ERROR - tRunWizard$SetupProgressStep$1 - Vendor: Oracle Corporation 
[  26277]  ERROR - tRunWizard$SetupProgressStep$1 - OS: Linux 
[  26277]  ERROR - tRunWizard$SetupProgressStep$1 - Last Action:  
[  31892]   WARN - api.vfs.impl.local.FileWatcher - Watcher terminated with exit code 0 
like image 870
user1841702 Avatar asked Mar 02 '15 07:03

user1841702


4 Answers

It's because Android Studio needs 32 bit libraries, and in your 64 bit version linux, it doesn't have. You can install the 32 bit version libs by typing the following command:

sudo apt-get install libc6-i386 libncurses5:i386 libstdc++6:i386

and then retry what you were doing.

like image 145
Archer Reilly Avatar answered Oct 19 '22 15:10

Archer Reilly


Ok, answering my question. I still really don't know why Android Studio's installer does not complete the installation for me, but one workaround is to manually download all the components you need (or rather the components that Android Studio cannot install) by going to:

/home/<your-system-name>/Android/Sdk/tools

and then running the Android shell script file.

Use

sh Android

and download all the components you need from the SDK manager. Once you are done run the studio.sh script file from:

/home/<your-system-name>/Documents/android-studio/bin/

or from where you have Android Studio extracted.

Note that Android Studio may still tell you that certain other components cannot be installed and all you have to do is to repeat the process i.e manually download the components that Android Studio needs and then run studio.sh.

Also ensure that you have a 64 bit version of Oracle Java and the necessary 32 bit executables(as @Archer Riley's answer indicates) to complete installation.

like image 26
user1841702 Avatar answered Oct 19 '22 17:10

user1841702


For recent Ubuntu versions, the official documentation recommends this libs:

$ sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1

(On older versions of Ubuntu the command to run was sudo apt-get install ia32-libs).

Source: http://tools.android.com/tech-docs/linux-32-bit-libraries

like image 41
luizMello Avatar answered Oct 19 '22 17:10

luizMello


Before running ./studio.sh, I had to install a few 32-bit libraries:

sudo apt-get install lib32z1
sudo apt-get install lib32ncurses5
sudo apt-get install lib32bz2-1.0
sudo apt-get install lib32stdc++6

Once those are installed, I was able to complete the installation without the mksdcard error.

like image 41
kiminoa Avatar answered Oct 19 '22 17:10

kiminoa