我一直在谷歌搜索,发现人们显示导入sl4a而不是androidhelper的脚本。当我尝试这样做时,我收到了没有名为sl4a'的模块。它只在Qpython3中运行吗?我在qpython的site-packages文件夹中有sl4a for arm。 TKS。
答案 0 :(得分:1)
在qpython2中,sl4a模块是androidhelper中的包。事实上,sl4a模块将在androidhelper
中导入您可以在下面执行qpython2
中单独导入sl4afrom androidhelper import sl4a
# OR
import androidhelper.sl4a as sl4a
# OR
import androidhelper # then access sl4a with androidhelper.sl4a
在qpython3中,sl4a和androidhelper模块都在sys.path中,因此您只需导入其中的任何一个