Love Android? And Python? Now these two great tastes taste great together, thanks to Scripting Layer for Android (SL4A). Here are some steps to get Python installed on the Android SDK emulator.
- Install the Android SDK, which includes the emulator.
- Start the Android SDK and AVD Manager.
- Create a new Android Virtual Device with an SD Card (must be at least 9MB, but I had to bump mine up to 16MB to avoid installation fail issues.)
- Run the emulator.
- Using the emulator’s browser, go to http://code.google.com/p/android-scripting/downloads/list.
- Find and download latest sl4a_.apk
- After download, select it, and click Install.
- After installation is finished, click Open.
- Click Menu -> View -> Interpreters. (Only “Shell” will be listed at first).
- Click Menu -> Add. Select Python 2.6.2. That apk will be downloaded automagically.
- Select the download, and install it.
- Click Open.
- Click Install. Python and python extras will then be installed. This may take a while.
- Start sl4a. Menu -> View -> Interpreters. Pick python.
- My Python REPL started in landscape, so I hit Ctrl-F11 to switch the emulator.
Here’s a screenshot of my emulator with the REPL running: