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&#160;Python实现批量安装android&#160;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= ...
随机推荐
-
SQL位移运算函数
-- ============================================= -- Author: <maco_wang> -- Create date: & ...
-
什么情况下会用到try-catch
本文不区分语言,只为记录一次有收获的面试. 面试官:什么情况下用到try-catch?程序员:代码执行预料不到的情况,我会使用try-catch.面试官:什么是预料不到的情况呢?程序员:比如我要计算a ...
-
VB.NET WinForm获取运行程序用户名
一个程序也许会被多个用户运行,如下: 那在VB.NET的WinForm环境下,怎样获取User Name呢?可从下面的方法: 代码: Public Shared Function GetProcess ...
-
2015弱校联盟(1) - E. Rectangle
E. Rectangle Time Limit: 1000ms Memory Limit: 65536KB 64-bit integer IO format: %lld Java class name ...
-
c# datagridview表格控件常用操作
1) 行右键菜单 private void dataGridView1_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e) { ...
-
ubuntu 挂起唤醒和声音偏小的问题
自从开始用ubuntu就遇到了声音偏小的问题,一直很让我头疼.还好插上耳机后勉强能用,也就没继续追究了. 可最近发现了一个更加严重的问题挂起后竟然无法唤醒,一直是黑屏的状态,必须强制关机再重启,这就蛋 ...
-
ionic获取事件中的对象
ng-click="submit1($event, 'argsTest’)" $scope.submit1=function(event, args){ var target = ...
-
hdoj 2045 不容易系列之(3)—— LELE的RPG难题
不容易系列之(3)—— LELE的RPG难题 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/O ...
-
详细分析MySQL事务日志(redo log和undo log)
innodb事务日志包括redo log和undo log.redo log是重做日志,提供前滚操作,undo log是回滚日志,提供回滚操作. undo log不是redo log的逆向过程,其实它 ...
-
http://ctf.bugku.com/challenges#love:bugku--love
做了一道逆向题目,主要关联到base64编码的知识点.下面做一分析. 题目如下: 通过测试,可知它没有加壳.尝试使用IDA进行分析. 1.IDA分析文件 打开文件后,按[shift+F12 ...