Configuration for Python to run on Android

It's exiting to learn to make app on Android with python. But when I check <Head First Python>, I found there was a lot of programming to download, to install, and a lot of set-up, a lot of configure...To make long story short, I record here every steps and the exception I encountered in each step for reference.

step 1: Set up development environment.

Item : Android emulator, a cross-platform provided by Google for you to develop without any hardware.

  1. Download the "Software Development Kit"(SDK).
  2. Add an android platform using "SDK Manager", to mimic the real phone setup.
    • All the details about setup can be easily found in http://developer.android.com/sdk/index.html, like where to find SDK Manager and how to install platform or package within it http://developer.android.com/sdk/installing/adding-packages.html. The website provides a comprhensive and awsome guidence to follow !
    • After downloading the platform, a line "Done. Nothing was installed." came up. The solution I found is to right click  "SDK manager.exe" and select "Run as Administrator". It does work !
    • The last problem is that when clicking "SDK manager.exe" and it just pop up and exit soon. But just check it looks well and HAVE NO IDEA how it happen.
  3. Create an "Android Virtual Device"(AVD).
    • Select a "Device" option with low image resolution, or it will fail to start emulator for less memory.
  4. Download "SL4A" into emulator and install Android Scripting.
  5. Download "python for android" into emulator and add to SL4A.
    • If fail to download apk into emulator, just try to reboost the emulator.
  6. Transfer a script to the emulator using adb , to test Python on Android.
    • If raised "error: device offline" after input command line "adb devices" in terminal window, try to reboost the emulator.

 

转载于:https://www.cnblogs.com/ffan/p/3588455.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值