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. servlet的配置和上下文

    一.Servlet配置对象(ServletConfig):Servlet初始化时,容器调用其init(ServletConfig)方法,传递该对象. 1.获得对象方法: (1).直接使用getServ ...

  2. 《C#开发微信门户及应用》

    C#开发微信门户及应用(40)--使用微信JSAPI实现微信支付功能 C#开发微信门户及应用(39)--使用微信JSSDK实现签到的功能 C#开发微信门户及应用(38)--微信摇一摇红包功能 C#开发 ...

  3. jmeter笔记1

    使用 JMeter 分布式性能测试       作为一个纯 JAVA 的GUI应用,JMeter 对于CPU和内存的消耗还是很惊人的, 所以当需要模拟数以千计的并发用户时,使用单台机器模拟所有的并发用 ...

  4. 如何查看IIS并发连接数【转】

    转http://wangfeng5271.blog.163.com/blog/static/4817444420128242123740/ 如果要查看IIS连接数,最简单方便的方法是通过“网站统计”来 ...

  5. Qt Charts

    简述 Qt Charts模块提供了一套易于使用的图表组件.它采用了Qt Graphics View框架,因此图表可以很容易地集成到现代的用户界面. Qt Charts可以被用作QWidgets.QGr ...

  6. hdu----(2084)数塔(dp)

    数塔 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submissi ...

  7. jQuery 2.0.3 源码分析 Deferrred概念

    转载http://www.cnblogs.com/aaronjs/p/3348569.html JavaScript编程几乎总是伴随着异步操作,传统的异步操作会在操作完成之后,使用回调函数传回结果,而 ...

  8. MongoDB相关资料

    MongoDB的介绍及安装参考http://www.cnblogs.com/lipan/archive/2011/03/08/1966463.html 安装过程: 第一步:下载安装包:官方下载地址←单 ...

  9. Phonegap hello world 不容易啊~!

    今天一个项目要用phonegap,当初就是觉得phonegap配置太tmd的麻烦了,所以转头appcan,但今天项目必须用-- 先是看到官方说用nodejs装,tmd的,总是重复同一个错误,安装不起, ...

  10. Ibatis.Net各类的作用说明(三)

    一.SqlMapper类 Ibatis中,加载.分析配置以及映射文件是在创建SqlMapper实例的时候进行的,另外对数据库的操作,也是在SqlMapper实例上调用方法来完成.在IBatis外部的程 ...