6

I am trying to install Android Studio on my new Raspi 3B with Raspbian Jessie. In the middle of the setup wizard I get an error: "Unable to run mksdcard SDK tool." After searching through stackoverflow I found this on installing missing 32-bit libraries for 64-bit OS. However, I think that the latest Raspbian Jessie is 32 bit (even though the Raspi 3 is capable of 64 bit).

When I tried their suggestion, this is the output:

$ sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package lib32z1
E: Unable to locate package lib32ncurses5
E: Unable to locate package lib32bz2-1.0
E: Couldn't find any package by regex 'lib32bz2-1.0'
E: Unable to locate package lib32stdc++6
E: Couldn't find any package by regex 'lib32stdc++6'

Has anyone done this before or know of a workaround? Thank you!

Andrew Patterson
  • 163
  • 1
  • 1
  • 4

2 Answers2

7

First, address size (such as 32 or 64 bit) is not the only defining characteristic of processor architecture. Commonplace desktops and laptops are x86(-64) based. The Raspberry Pi's SoC is not. It is ARM based, like most mobile devices.

While it is not explicit on the download page, the fact that Android Studio is distributed in binary form with only two options (32 or 64 bit) implies with certainty these are x86 binaries.

So you are out of luck.

Note that various tools such as adb are available as packages on Raspbian (and the SDK appears to be...), as I think is Eclipse(??), but I do not know how far you can go with that development wise. I doubt very much there is any possibility of running an emulator on the Pi and if there were, it would be horrific performance wise. I also doubt running Eclipse on the Pi 3 is going to be much fun.

This is probably not something worth pursuing.

goldilocks
  • 60,325
  • 17
  • 117
  • 234
2

ok, with a bit more checking, I was able to confirm that the mksdcard is one of the command line sdk 'tools' that comes with the android sdk. That means they are compiled for the given architecture rather than part of the java packages.

You can grab the source from:

git clone "https://android.googlesource.com/platform/sdk"

If you then go into the emulator code, you can find the source for mksdcard

cd sdk/emulator/mksdcard/src/source
gcc -o mksdcard mksdcard.c

it compiled for me with no problems. (of course, you'll need gcc and probably at least a few of the necessary libs installed. Check the #include lines in the source for that utility to see what it uses)

Then just move it into your ~/Android/ folder (it appears to exist - identical file - in two places)

install mksdcard ~/Android/Sdk/tools/
install mksdcard ~/Android/Sdk/emulator/
Scott Wood
  • 130
  • 5