[蟒蛇= 2.7]
我最近开始使用 kivy(最新版本)为 android 开发应用程序。为此,我使用 buildozer(最新版本)来创建 apk 文件。现在,即使使用 python-firebase 模块,我的计算机上的一切都可以正常工作。将数据发送到 firebase 在线数据库。但是当我想在我的手机上使用 python 模块python-firebase(基于模块requests)时,应用程序在加载几秒钟后崩溃。
现在我在 buildozer.spec 中的要求是 plyer 和 kivy。如果我尝试向此列表添加请求,则会收到错误消息:
在 virtualenv 中安装需求请求
运行'pip install --download-cache=/home/notwaka/.buildozer/cache --target=/home/notwaka/Desktop/Gps/.buildozer/applibs requests'
Cwd /home/notwaka/Desktop/Gps/.buildozer
Usage:
pip install [options] <requirement specifier> [package-index-options] ...
pip install [options] -r <requirements file> [package-index-options] ...
pip install [options] [-e] <vcs project url> ...
pip install [options] [-e] <local project path> ...
pip install [options] <archive url/path> ...
没有这样的选项:--download-cache
命令失败:pip install --download-cache=/home/notwaka/.buildozer/cache --target=/home/notwaka/Desktop/Gps/.buildozer/applibs 请求
Buildozer 执行最后一条命令失败
我是否需要向需求添加请求,因为它是在使用 buildozer 的文档中的示例中完成的?我该怎么做才能使 python-firebase 在我的 android 设备上工作?我不知道如何制作食谱,也找不到任何好的文档。制作食谱可以吗?有没有人试图让firebase在android上使用python?
提前致谢!
编辑:
'# Check application requirements
# Run './distribute.sh -l'
# Cwd /home/notwaka/Desktop/try/.buildozer/android/platform/python-for-android
Available modules: android apsw audiostream bidi boost cherrypy c_igraph click cprotobuf cymunk django docutils ecdsa enum34 evdev ffmpeg ffmpeg2 ffpyplayer ffpyplayer_tito flask freetype gevent greenlet harfbuzz hostpython igraph itsdangerous jinja2 jpeg kivent_core kivent_cymunk kivy leveldb libevent libpq libsodium libswift libtorrent libxml2 libxslt libyaml lxml m2crypto markupsafe midistream msgpack mysql_connector netifaces numpy opencv openssl paramiko pil plyer plyvel png polygon protobuf psutil psycopg2 pyasn1 pycrypto pygame pyjnius pylibpd pyopenssl pyparsing pyqrcode python pyyaml sdl setuptools six sqlalchemy sqlite3 storm swift thrift twisted txws werkzeug wokkel zeroconf zope
# Remove directory and subdirectory /home/notwaka/Desktop/try/.buildozer/applibs
# Create directory /home/notwaka/Desktop/try/.buildozer/applibs
# Run 'bash -c "source venv/bin/activate && env"'
# Cwd /home/notwaka/Desktop/try/.buildozer
LC_PAPER=nl_NL.UTF-8
XDG_VTNR=7
LC_ADDRESS=nl_NL.UTF-8
XDG_SESSION_ID=c2
CLUTTER_IM_MODULE=xim
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/notwaka
SELINUX_INIT=YES
LC_MONETARY=nl_NL.UTF-8
GPG_AGENT_INFO=/run/user/1000/keyring-wWFm7x/gpg:0:1
VTE_VERSION=3409
SHELL=/bin/bash
TERM=xterm
LC_NUMERIC=nl_NL.UTF-8
WINDOWID=65011724
UPSTART_SESSION=unix:abstract=/com/ubuntu/upstart-session/1000/1938
GNOME_KEYRING_CONTROL=/run/user/1000/keyring-wWFm7x
GTK_MODULES=overlay-scrollbar:unity-gtk-module
USER=notwaka
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:
LC_TELEPHONE=nl_NL.UTF-8
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
SSH_AUTH_SOCK=/run/user/1000/keyring-wWFm7x/ssh
DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path
VIRTUAL_ENV=/home/notwaka/Desktop/try/.buildozer/venv
XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg
PATH=/home/notwaka/Desktop/try/.buildozer/venv/bin:/home/notwaka/.buildozer/android/platform/apache-ant-1.9.4/bin:/home/notwaka/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
DESKTOP_SESSION=ubuntu
QT_IM_MODULE=ibus
ANDROIDAPI=19
QT_QPA_PLATFORMTHEME=appmenu-qt5
LC_IDENTIFICATION=nl_NL.UTF-8
JOB=gnome-session
PWD=/home/notwaka/Desktop/try/.buildozer
XMODIFIERS=@im=ibus
LANG=en_US.UTF-8
GNOME_KEYRING_PID=1936
GDM_LANG=en_US
MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path
LC_MEASUREMENT=nl_NL.UTF-8
ANDROIDNDK=/home/notwaka/.buildozer/android/platform/android-ndk-r9c
IM_CONFIG_PHASE=1
COMPIZ_CONFIG_PROFILE=ubuntu
PS1=(venv)
GDMSESSION=ubuntu
PACKAGES_PATH=/home/notwaka/.buildozer/android/packages
SESSIONTYPE=gnome-session
HOME=/home/notwaka
SHLVL=2
XDG_SEAT=seat0
LANGUAGE=en_US
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
UPSTART_INSTANCE=
UPSTART_EVENTS=started starting
ANDROIDSDK=/home/notwaka/.buildozer/android/platform/android-sdk-20
LOGNAME=notwaka
XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-lqf94SPFU0
QT4_IM_MODULE=xim
LESSOPEN=| /usr/bin/lesspipe %s
ANDROIDNDKVER=r9c
UPSTART_JOB=unity-settings-daemon
INSTANCE=Unity
TEXTDOMAIN=im-config
DISPLAY=:0
XDG_RUNTIME_DIR=/run/user/1000
XDG_CURRENT_DESKTOP=Unity
GTK_IM_MODULE=ibus
LESSCLOSE=/usr/bin/lesspipe %s %s
LC_TIME=nl_NL.UTF-8
TEXTDOMAINDIR=/usr/share/locale/
LC_NAME=nl_NL.UTF-8
XAUTHORITY=/home/notwaka/.Xauthority
COLORTERM=gnome-terminal
_=/usr/bin/env
# Install distribute
# Run 'curl http://python-distribute.org/distribute_setup.py | venv/bin/python'
# Cwd /home/notwaka/Desktop/try/.buildozer
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
# Install requirement pygments in virtualenv
# Run 'pip install --download-cache=/home/notwaka/.buildozer/cache --target=/home/notwaka/Desktop/try/.buildozer/applibs pygments'
# Cwd /home/notwaka/Desktop/try/.buildozer
Usage:
pip install [options] <requirement specifier> [package-index-options] ...
pip install [options] -r <requirements file> [package-index-options] ...
pip install [options] [-e] <vcs project url> ...
pip install [options] [-e] <local project path> ...
pip install [options] <archive url/path> ...
no such option: --download-cache
# Command failed: pip install --download-cache=/home/notwaka/.buildozer/cache --target=/home/notwaka/Desktop/try/.buildozer/applibs pygments
#
# Buildozer failed to execute the last command
# The error might be hidden in the log above this error
# Please read the full log, and search for it before
# raising an issue with buildozer itself.
# In case of a bug report, please add a full log with log_level = 2
'