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.
- Download the "Software Development Kit"(SDK).
- 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.
- Create an "Android Virtual Device"(AVD).
- Select a "Device" option with low image resolution, or it will fail to start emulator for less memory.
- Download "SL4A" into emulator and install Android Scripting.
- Download "python for android" into emulator and add to SL4A.
- If fail to download apk into emulator, just try to reboost the emulator.
- 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的更多相关文章
- Python 通过脚本获取Android的apk的部分属性,再通过加密算法生成秘钥。
Python 通过脚本获取Android的apk的部分属性,再通过加密算法生成秘钥. #!/usr/bin/env python # -*- coding: utf- -*- import os im ...
- Python Python实现批量安装android apk包
基于Python实现批量安装android apk包 by:授客 QQ:1033553122 1.相关软件包及文件下载 下载地址:adb软件包及批量安装apk包的py文件.zip 2.测试环境 Win ...
- android菜鸟学习笔记16----Android项目打包安装过程(Run as Android Application)
右击项目名称,Run as Android Appication之后,Android项目打包安装过程: 1.打包生成.apk文件: 1)把源码中的.java文件编译生成.class文件 2)将所有的. ...
- 解决 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? 解 ...
- ubuntu 下应用 Python 和 SL4A 的 Android 应用程序搭建您自己的android研发环境
转载自:http://code.qtuba.com/article-50680.html 最近在看<head first python>,书中有讲python在android中进行开发的章 ...
- python Windows下的android设备截图工具
目录 界面版 命令行版 界面版 利用python的wx库写个ui界面,用来把android设备的截图输出到电脑屏幕,前提需要安装adb,涉及到的python库也要安装.代码如下: #!/usr/bin ...
- 使用python编写批量卸载android应用的脚本
该脚本的功能是卸载android手机中安装的所有第三方应用,主要是使用adb shell pm.adb uninstall 命令,所以使用的前提是需要配好adb的环境变量,下面上代码: #!/usr/ ...
- 用Python为iOS和Android写跨平台的应用
首先保证安装了最新的python(当前安装的是python3.6) 一.安装Kivy :python -m pip install --upgrade pip wheel setuptools pyt ...
- 【ATX学习大纲】【ATX基于uiautomator2+Python学习】之Android自动化
github学习地址:https://github.com/openatx/uiautomator2 <_io.TextIOWrapper name='<stderr>' mode= ...
随机推荐
- ArcMap中"开始编辑"遇到一个或多个带有警告的图层“如果继续,可能无法编辑某些图层”的警告框
开始编辑后可能出现的错误: 如果 ArcMap 在所选数据上启动编辑会话时遇到问题,将弹出一个对话框以提供附加信息.您可能会收到错误.警告或信息消息. 出现错误 时用户不可以启动任何编辑会话.只有解 ...
- BZOJ1029: [JSOI2007]建筑抢修(贪心)
题目链接:BZOJ1029: [JSOI2007]建筑抢修 题解:贪心思想,按结束时间从小到大排序,选花费时间尽量短的建筑维修,用堆维护. #include<stdio.h> #inclu ...
- 最小生成树练习1(克鲁斯卡尔算法Kruskal)
今天刷一下水题练手入门,明天继续. poj1861 Network(最小生成树)新手入门题. 题意:输出连接方案中最长的单根网线长度(必须使这个值是所有方案中最小的),然后输出方案. 题解:本题没有直 ...
- JFrame背景
1.引言 在了解了JFrame面板的相关知识后,我们可以选择在RootPane根面板或LayeredPane面板中设置背景图案. 2.方法 对于大小固定的窗口背景设置如下: //导入图案 ImageI ...
- DIV使用tabindex获得事件详解 移动div
添加 tabindex='-1' 属性: 默认:获取不到焦点事件(blur) 1 <div class="wl-product" id="wl-product&qu ...
- placeholder在ie789下无效
<input type="text" class="input" placeholder="用户名/手机号码/邮箱" value=&q ...
- 使用strace工具故障排查的5种简单方法
使用strace工具故障排查的5种简单方法 本文源自5 simple ways to troubleshoot using strace strace 是一个非常简单的工具,用来跟踪可执行程序的系统调 ...
- 创建论坛Discuz
下载discuz! mkdir /data/wwwcd /data/wwwwget http://download.comsenz.com/DiscuzX/3.2/Discuz_X3.2_SC_GB ...
- 监听TelephonyManager的通话状态来监听手机的所有的来电
import java.io.FileNotFoundException;import java.io.OutputStream;import java.io.PrintStream;import j ...
- js事件应用
---恢复内容开始--- 一.自定义滚动条 var oDiv=document.getElementById('div1'); var oParent=document.getElementById( ...