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.

Configuration for Python to run on Android的更多相关文章

  1. Python 通过脚本获取Android的apk的部分属性,再通过加密算法生成秘钥。

    Python 通过脚本获取Android的apk的部分属性,再通过加密算法生成秘钥. #!/usr/bin/env python # -*- coding: utf- -*- import os im ...

  2. Python Python实现批量安装android apk包

    基于Python实现批量安装android apk包 by:授客 QQ:1033553122 1.相关软件包及文件下载 下载地址:adb软件包及批量安装apk包的py文件.zip 2.测试环境 Win ...

  3. android菜鸟学习笔记16----Android项目打包安装过程(Run as Android Application)

    右击项目名称,Run as Android Appication之后,Android项目打包安装过程: 1.打包生成.apk文件: 1)把源码中的.java文件编译生成.class文件 2)将所有的. ...

  4. 解决 React-Native: Android project not found. Maybe run react-native android first?

    在终端运行命令react-native run-android时报错Android project not found. Maybe run react-native android first? 解 ...

  5. ubuntu 下应用 Python 和 SL4A 的 Android 应用程序搭建您自己的android研发环境

    转载自:http://code.qtuba.com/article-50680.html 最近在看<head first python>,书中有讲python在android中进行开发的章 ...

  6. python Windows下的android设备截图工具

    目录 界面版 命令行版 界面版 利用python的wx库写个ui界面,用来把android设备的截图输出到电脑屏幕,前提需要安装adb,涉及到的python库也要安装.代码如下: #!/usr/bin ...

  7. 使用python编写批量卸载android应用的脚本

    该脚本的功能是卸载android手机中安装的所有第三方应用,主要是使用adb shell pm.adb uninstall 命令,所以使用的前提是需要配好adb的环境变量,下面上代码: #!/usr/ ...

  8. 用Python为iOS和Android写跨平台的应用

    首先保证安装了最新的python(当前安装的是python3.6) 一.安装Kivy :python -m pip install --upgrade pip wheel setuptools pyt ...

  9. 【ATX学习大纲】【ATX基于uiautomator2+Python学习】之Android自动化

    github学习地址:https://github.com/openatx/uiautomator2 <_io.TextIOWrapper name='<stderr>' mode= ...

随机推荐

  1. JavaScript document

    window -- document用于表现HTML页面当前窗体的内容 document,中文"文档" document是BOM中最重要对象之一 document对象是window ...

  2. DSP EPWM学习笔记1 - EPWM定时中断

    DSP EPWM学习笔记1 - EPWM定时中断 彭会锋 EPWM模块组成 EPWM有7个子模块组成:时间基准 TB.比较功能 CC.动作限定 AQ.死区产生 DB.斩波控制 PC.故障捕获 TZ.事 ...

  3. WebService是什么

    Webservice的一个最基本的目的就是提供在各个不同平台的不同应用系统的协同工作能力. 其实WebService并不是什么神秘的东西,它就是一个可以远程调用的类,或者说是组件. 为什么要使用Web ...

  4. 集成 AliPay - 支付宝

    作者感言 前面我已经写了一篇关于WeChat SDK的支付篇, 那我们继续研究接下来的支付SDK, 这次就是国民支付软件支付宝, 下面就让我们来看看怎么集成AliPay SDK.最后:如果你有更好的建 ...

  5. 多条查询sql语句返回多表数据集

    + + "';SELECT ProductID,ProductTitle,ProductName,SalePrice,ListingPrice,MainPicture,SaledItemCo ...

  6. c# 中的委托以及匿名方法lambda

    1.委托的定义internal delegate int MyAddFunDe(int a,int b)2.匿名方法1)MyAddFunDe fun = delegate(int a,int b){  ...

  7. soap base64 调用

      xsd__base64Binary data;     data.__ptr = (unsigned char*) soap_malloc(_soapProxy,picLen);     data ...

  8. 让DIV实现抖动效果!

    <html> <head> <meta http-equiv="Content-Type" content="text/html; char ...

  9. 使用Socket进行通信

    客户端通常可使用Socket的构造器来连接到指定服务器,Socket通常可使用如下两个构造器. Socket(lnetAddress/String  remoteAddress , int  port ...

  10. (转)onTouchEvent方法的使用

      (转)onTouchEvent方法的使用 手机屏幕事件的处理方法onTouchEvent.该方法在View类中的定义,并且所有的View子类全部重写了该方法,应用程序可以通过该方法处理手机屏幕的触 ...