Я пытаюсь преобразовать тестовый python файл kivy в apk. Я хотел избежать длительных методов, таких как загрузка virtualbox и запуск linux на виртуальной машине, поэтому я решил использовать консоль bash на pythoneverywhere.com. Я тщательно следовал инструкциям https://kivy.org/doc/stable/guide/packaging-android.html, но последняя команда buildozer android debug deploy run
не работает и вывод следующий:
11:13 ~/buildozer (master)$ buildozer android debug deploy run
# Check configuration tokens
# WARNING: Config token app android.sdk is deprecated and ignored, but you set value 24
# Ensure build layout
# Create directory /home/denezioden69420/.buildozer
# Create directory /home/denezioden69420/.buildozer/cache
# Create directory /home/denezioden69420/.buildozer/android/platform/android/platform
# Check configuration tokens
# Read available permissions from api-versions.xml
# Preparing build
# Check requirements for android
# Run 'dpkg --version'
# Cwd None
Debian 'dpkg' package management program version 1.18.4 (amd64).
This is free software; see the GNU General Public License version 2 or
later for copying conditions. There is NO warranty.
# Search for Git (git)
# -> found at /usr/bin/git
# Search for Cython (cython)
# -> found at /usr/bin/cython
# Search for Java compiler (javac)
# -> found at /usr/lib/jvm/java-8-openjdk-amd64/bin/javac
# Search for Java keytool (keytool)
# -> found at /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/keytool
# Install platform
# Run 'git config --get remote.origin.url'
# Cwd /home/denezioden69420/buildozer/.buildozer/android/platform/python-for-android
https://github.com/kivy/python-for-android.git
# Run 'git branch -vv'
# Cwd /home/denezioden69420/buildozer/.buildozer/android/platform/python-for-android
* master 52abfe9 [origin/master] Merge pull request #2118 from AndreMiras/feature/bump_openssl_master
# Run '/usr/bin/python -m pip install -q --user \'appdirs\' \'colorama>=0.3.3\' \'jinja2\' \'six\' \'enum34; python_version<"3.4"\' \'sh>=1.10; sys_platform!="nt"\' \'pep517<0.7.0"\' \'
pytoml\' \'virtualenv\''
# Cwd None
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will d
rop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
# Android ANT is missing, downloading
# Downloading http://archive.apache.org/dist/ant/binaries/apache-ant-1.9.4-bin.tar.gz
# Run 'tar xzf apache-ant-1.9.4-bin.tar.gz'
# Cwd /home/denezioden69420/.buildozer/android/platform/apache-ant-1.9.4
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
# Command failed: tar xzf apache-ant-1.9.4-bin.tar.gz
# ENVIRONMENT:
# http_proxy = 'http://proxy.server:3128'
# LC_CTYPE = 'en_US.utf-8'
# PYTHONANYWHERE_DOMAIN = 'pythonanywhere.com'
# USER = 'denezioden69420'
# PATH = '/home/denezioden69420/.buildozer/android/platform/apache-ant-1.9.4/bin:/home/denezioden69420/.local/bin:/home/denezioden69420/.local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin'
# HOME = '/home/denezioden69420'
# VIRTUALENVWRAPPER_SCRIPT = '/usr/bin/virtualenvwrapper.sh'
# TERM = 'xterm-256color'
# SHELL = '/bin/bash'
# SHLVL = '1'
# https_proxy = 'http://proxy.server:3128'
# PYTHONANYWHERE_SITE = 'www.pythonanywhere.com'
# SUDO_USER = 'root'
# JAVA_HOME = '/usr/lib/jvm/java-7-openjdk-amd64'
# USERNAME = 'denezioden69420'
# WORKON_HOME = '/home/denezioden69420/.virtualenvs'
# SUDO_COMMAND = '/bin/bash -l -c cd .;cd . ; cd /home/denezioden69420; exec bash '
# SUDO_UID = '0'
# VIRTUALENVWRAPPER_WORKON_CD = '1'
# PYENCHANT_LIBRARY_PATH = '/usr/lib/libenchant.so.1'
# _ = '/home/denezioden69420/.local/bin/buildozer'
# VIRTUALENVWRAPPER_PROJECT_FILENAME = '.project'
# SUDO_GID = '0'
# VIRTUALENVWRAPPER_HOOK_DIR = '/home/denezioden69420/.virtualenvs'
# PYTHONSTARTUP = '/home/denezioden69420/.pythonstartup.py'
# OLDPWD = '/home/denezioden69420'
# HISTCONTROL = 'ignoreboth'
# no_proxy = 'localhost,127.0.0.1,localaddress,.localdomain.com,/var/run/docker.sock'
# PWD = '/home/denezioden69420/buildozer'
# LOGNAME = 'denezioden69420'
#
# 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
Он говорит, что не может разархивировать этот файл - android -ndk-r19b- linux -x86_64.zip однако, если я открою файл, то это будет не файл zip, а html:
<html><head>
<meta type="copyright" content="Copyright (C) 1996-2015 The Squid Software Foundation and contributors">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>ERROR: The requested URL could not be retrieved</title>
<style type="text/css"><!--
/*
* Copyright (C) 1996-2015 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
* Please see the COPYING and CONTRIBUTORS files for details.
*/
/*
Stylesheet for Squid Error pages
Adapted from design by Free CSS Templates
http://www.freecsstemplates.org
Released for free under a Creative Commons Attribution 2.5 License
*/
/* Page basics */
* {
font-family: verdana, sans-serif;
}
html body {
margin: 0;
padding: 0;
background: #efefef;
font-size: 12px;
color: #1e1e1e;
}
/* Page displayed title area */
#titles {
margin-left: 15px;
padding: 10px;
padding-left: 100px;
background: url('/squid-internal-static/icons/SN.png') no-repeat left;
}
/* initial title */
#titles h1 {
color: #000000;
}
#titles h2 {
color: #000000;
}
/* special event: FTP success page titles */
#titles ftpsuccess {
background-color:#00ff00;
width:100%;
}
/* Page displayed body content area */
#content {
padding: 10px;
background: #ffffff;
}
/* General text */
p {
}
/* error brief description */
#error p {
}
/* some data which may have caused the problem */
#data {
}
/* the error message received from the system or other software */
#sysmsg {
}
pre {
font-family:sans-serif;
}
/* special event: FTP / Gopher directory listing */
#dirmsg {
font-family: courier;
color: black;
font-size: 10pt;
}
#dirlisting {
margin-left: 2%;
margin-right: 2%;
}
#dirlisting tr.entry td.icon,td.filename,td.size,td.date {
border-bottom: groove;
}
#dirlisting td.size {
width: 50px;
text-align: right;
padding-right: 5px;
}
/* horizontal lines */
hr {
margin: 0;
}
/* page displayed footer area */
#footer {
font-size: 9px;
padding-left: 10px;
}
body
:lang(fa) { direction: rtl; font-size: 100%; font-family: Tahoma, Roya, sans-serif; float: right; }
:lang(he) { direction: rtl; }
--></style>
</head><body id="ERR_UNSUP_REQ">
<div id="titles">
<h1>ERROR</h1>
<h2>The requested URL could not be retrieved</h2>
</div>
<hr>
<div id="content">
<p>The following error was encountered while trying to retrieve the URL: <a href="https://dl.google.com/android/repository/android-ndk-r19b-linux-x86_64.zip">https://dl.google.com/android/repository/android-ndk-r19b-linux-x86_64.zip</a></p>
<blockquote id="error">
<p><b>Unsupported Request Method and Protocol</b></p>
</blockquote>
<p>Squid does not support all request methods for all access protocols. For example, you can not POST a Gopher request.</p>
<p>Your cache administrator is <a href="mailto:webmaster?subject=CacheErrorInfo%20-%20ERR_UNSUP_REQ&body=CacheHost%3A%20blue-liveproxy1%0D%0AErrPage%3A%20ERR_UNSUP_REQ%0D%0AErr%3A%20%5Bnone%5D%0D%0ATimeStamp%3A%20Sat,%2004%20Apr%202020%2009%3A50%3A23%20GMT%0D%0A%0D%0AClientIP%3A%2010.0.0.97%0D%0A%0D%0AHTTP%20Request%3A%0D%0AGET%20%2Fandroid%2Frepository%2Fandroid-ndk-r19b-linux-x86_64.zip%20HTTP%2F1.0%0AUser-Agent%3A%20Mozilla%2F5.0%20(X11%3B%20Linux%20x86_64)%20AppleWebKit%2F537.36%20(KHTML,%20like%20Gecko)%20Chrome%2F28.0.1500.71%20Safari%2F537.36%0D%0A%0D%0A%0D%0A">webmaster</a>.</p>
<br>
</div>
<hr>
<div id="footer">
<p>Generated Sat, 04 Apr 2020 09:50:23 GMT by blue-liveproxy1 (squid/3.5.12)</p>
<!-- ERR_UNSUP_REQ -->
</div>
</body></html>
Файл в /.buildozer/android/platform/apache-ant-1.9.4
:
<HTML>
<HEAD>
Access Denied
</HEAD>
<BODY>
<h1>Access Denied</h1>
<p>
Access to arbitrary websites is not available from free accounts;
you can only access sites that are on our
<a href="http://www.pythonanywhere.com/whitelist">whitelist</a>.
If you want to suggest something to add to our whitelist
drop us a line at support@pythonanywhere.com. It will have
to have an official public API.
</p>
<p>
Alternatively, you can sign up for a paid account at
<a href="http://www.pythonanywhere.com/account/">http://www.pythonanywhere.com/account/</a>
</p>
<p>
If you have already got a paid account and you're still getting this messge,
you may need to reload your web app (from the "Web" tab) or restart
your consoles. If that doesn't help, drop us a line at support@pythonanywhere.com.
</p>
</BODY>