QPython 错误的 android.Android()

标签 android python sl4a qpython

我正在运行 SL4A Python 2.6.2 解释器。此代码可以正常工作:

import android
droid = android.Android()

但是当我在同一台机器上运行 QPython 2.7.2 解释器时,相同的代码给我错误:

AttributeError: 'module' object has no attribute 'Android'

最佳答案

改为导入 androidhelper

import androidhelper
droid = androidhelper.Android()

关于QPython 错误的 android.Android(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20859349/

相关文章:

android - 为什么正常的图片分配了很多内存?

java - Android 多货币格式化

android - 在 Android 操作系统上安装 Perl 模块

python - 如何停止在 django/python 中记录发送长度消息

python - IPython 5.0 : Remove spaces between input lines

javascript - 如何在 SL4A 上从 python 调用 javascript 方法?

android - 您最喜欢在 Android 手机上使用的代码编辑器是什么?

android - 当点击一个按钮在android中顺时针旋转图像

java - Android开发与hibernate+spring

python - 如何解决 Django 中显示 "Could not parse the remainder"的 TemplateSyntaxError