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. 添加SSH密钥到GitHub

    $ clip < ~/.ssh/id_rsa.pubbash: /c/Users/UsersName/.ssh/id_rsa.pub: No such file or directory [转] ...

  2. 《基于MVC的Javascript》

    var Class = function(){ var klass = function(){ this.init.apply(this,arguments); } klass.prototype.i ...

  3. var isObj = length === undefined || i

    这个其实是因为你前面那个===是肯定为false导致的,所以执行到了i那一步了var length=undefined;var a=length===undefined || i;这样你不定义i也是不 ...

  4. ACM2 递归 n分成k份

    //将n 分成k份的 分法总数 #include "stdafx.h" #include"stdio.h" #include<iostream> u ...

  5. WPF:ListView数据绑定及Style

    DrugRecordsWin.xaml <ListView Grid.Row="4" Grid.Column="1" Name="list_Dr ...

  6. mvc伪静态<四> 伪静态后静态页面或者引用的css和图片失效

    引用的css和图片失效的解决办法 把样式引用文件的相对路径改成绝对路径就可以了 比如原先的引用路径为:<link href="~/Content/css/style.css" ...

  7. BZOJ1029: [JSOI2007]建筑抢修(贪心)

    题目链接:BZOJ1029: [JSOI2007]建筑抢修 题解:贪心思想,按结束时间从小到大排序,选花费时间尽量短的建筑维修,用堆维护. #include<stdio.h> #inclu ...

  8. DOM节点-appendChild

    <!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head>    < ...

  9. Notepad++ 配置java编译环境

    仅限于学习java或小的java程序使用.正常写代码还是eclipse吧 ---------------------分割线----------------------------- 1.配置JDK环境 ...

  10. Servlet容器如何同时来处理多个请求

    工作者线程Work Thread:执行代码的一组线程调度线程Dispatcher Thread:每个线程都具有分配给它的线程优先级,线程是根据优先级调度执行的Servlet采用多线程来处理多个请求同时 ...