Unable to install Android Studio in Ubuntu [duplic

2019-01-10 04:58发布

This question already has an answer here:

I'm using Ubuntu Gnome 14.04, and I have Java 8 installed (both the JDK and the JRE).

When I was installing Android Studio everything worked, but a message appeared saying:

Unable to run mksdcard SDK tool

How can I install Android Studio correctly, or how do I fix this ?

10条回答
Deceive 欺骗
2楼-- · 2019-01-10 05:21

None of these options worked for me on Ubuntu 12.10 (yeah, I need to upgrade). However, I found an easy solution. Download the source from here: https://github.com/miracle2k/android-platform_sdk/blob/master/emulator/mksdcard/mksdcard.c. Then simply compile with "gcc mksdcard.c -o mksdcard". Backup mksdcard in the SDK tools subfolder and replace with the newly compiled one. Android Studio will now be happy with your SDK.

查看更多
一纸荒年 Trace。
3楼-- · 2019-01-10 05:22

If you run sudo apt-get install lib32z1 lib32ncurses5 libbz2-1.0 lib32stdc++6 and got a message like: "The following packages have unmet dependencies: lib32stdc++6 : Depends: lib32gcc1 (>= 1:4.1.1)".

You can do something like this tut: https://askubuntu.com/questions/671791/lib32stdc6-package-depends-on-gcc-base-but-my-installed-version-is-newer

查看更多
Bombasti
4楼-- · 2019-01-10 05:25

For Fedora (tested for Fedora 23/24) run

dnf install compat-libstdc++-296 compat-libstdc++-33 glibc libgcc nss-softokn-freebl libstdc++ ncurses-libs zlib-devel.i686 ncurses-devel.i686 ant
查看更多
甜甜的少女心
5楼-- · 2019-01-10 05:27

I understand the question is regarding UBUNTU, but I had similar problem in Debian Jessie 64bit and warsongs suggestion worked for it also.
When I ran studio.sh android studio would start, but when I tried to configure the android SDK I got the error
Unable to run mksdcard SDK tool
WHen I tried
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6
Got error
E: Package 'lib32bz2-1.0' has no installation candidate
So took warsongs suggestion and only tried to install lib32stdc++6.
sudo apt-get install lib32stdc++6
After this was able to add the Android SDK into Android Studio.

查看更多
霸刀☆藐视天下
6楼-- · 2019-01-10 05:28

@warsong is right. Installing only lib32stdc++6 solved the problem.

For next uses I rewrite @warsongs comment in answer area.

sudo apt-get install lib32stdc++6

Update :

For Ubuntu 15.04,15.10,16.04 LTS & Debian 8

查看更多
啃猪蹄的小仙女
7楼-- · 2019-01-10 05:32

The Problem is caused by mksdcard not being installed correctly.

if you are running 64 bit, do this to fix the mksdcard problem.

    sudo dpkg --add-architecture amd64
    sudo apt-get update
    sudo apt-get install libncurses5:amd64 libstdc++6:amd64 zlib1g:amd64

and 32 bit:

    sudo dpkg --add-architecture i386
    sudo apt-get update
    sudo apt-get install libncurses5:i386 libstdc++6:i386 zlib1g:i386

In SDK 6.0, the error message is different but means the same thing.

    Unable to run mksdcard
查看更多
登录 后发表回答