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!

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.

  • 3
    The Android emulator runs rather poorly on my desktop's i7. I give it approximately 0% chance of even being capable of loading on the RPi. – Jacobm001 Oct 31 '16 at 18:04
  • 2
    Yeah it is not a thrill ride. Last I recall it required at least a GB of RAM too so you are probably right about "impossible". Eclipse is not going to get far either. You might be able to compose, compile, and upload, but not with the standard GUI apps. And, presuming the compile is possible, there will be plenty of time for things like coffee and laundry while it is going on... – goldilocks Oct 31 '16 at 18:21
  • Yeah, you're right this is going to happen. I was hoping to set up Android studio so I could build android apps with React Native and build them on an attached device, but I think I'll stick to doing dev work on my macbook and leave the pi for tinkering :) – Andrew Patterson Oct 31 '16 at 18:38
  • the core idea items in the idea suites are written in java. the arm-vs-x86 wouldn't matter for the java portions. But presumably, mksdcard depends on non-java based system tools. My suggestion would be to look more into what mksdcard does and try first to get a version of it working on rpi if it's even possible – Scott Wood Mar 17 '17 at 18:04
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/
  • You may need to or want to do something similar for the other tools in those directories - again, if possible. – Scott Wood Mar 17 '17 at 20:05
  • Did you have success with the recommend procedure? – ellooku Jul 26 '18 at 12:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.