zoukankan      html  css  js  c++  java
  • 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.
  • 相关阅读:
    Jmeter属性和变量
    用trie树解决最大异或对问题(On)
    trie树
    kmp算法
    数学归纳法
    单调栈和单调队列
    区间合并
    离散化
    位运算
    双指针算法
  • 原文地址:https://www.cnblogs.com/ffan/p/3588455.html
Copyright © 2011-2022 走看看