If you have python code which you want to run in the android, then you will need something other than default android development environment. It is because android doesn't support python natively.
Kivy runs on Linux, Windows, OS X, Android, iOS, and Raspberry Pi. The graphics engine is built over OpenGL ES 2, using a modern and fast graphics pipeline. Many parts are written in C using Cython.
Refer the https://kivy.org/#download
Create a virtualenv and install Kivy package
Create a virtualenv
(base) Deepaks-MacBook-Air:python deepak$ virtualenv kivyenv
Using base prefix '/Users/deepak/opt/anaconda3'
New python executable in /Users/deepak/Documents/coding/python/kivyenv/bin/python3
Also creating executable in /Users/deepak/Documents/coding/python/kivyenv/bin/python
Installing setuptools, pip, wheel...
done.
(base) Deepaks-MacBook-Air:python deepak$ source kivyenv/bin/activate
(kivyenv) Shilpis-Air:android shilpimittal$ python --version
Python 3.7.7
(kivyenv) Shilpis-Air:kivyHelloWorld shilpimittal$ pip install kivy
Collecting kivy
Downloading Kivy-1.11.1-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (6.9 MB)
|████████████████████████████████| 6.9 MB 1.1 MB/s
Collecting Kivy-Garden>=0.1.4
Downloading kivy-garden-0.1.4.tar.gz (6.8 kB)
Collecting pygments
Downloading Pygments-2.6.1-py3-none-any.whl (914 kB)
|████████████████████████████████| 914 kB 1.5 MB/s
Collecting docutils
Downloading docutils-0.16-py2.py3-none-any.whl (548 kB)
|████████████████████████████████| 548 kB 4.1 MB/s
Collecting requests
Downloading requests-2.23.0-py2.py3-none-any.whl (58 kB)
|████████████████████████████████| 58 kB 2.5 MB/s
Collecting certifi>=2017.4.17
Downloading certifi-2020.4.5.1-py2.py3-none-any.whl (157 kB)
|████████████████████████████████| 157 kB 3.5 MB/s
Collecting chardet<4,>=3.0.2
Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB)
|████████████████████████████████| 133 kB 6.7 MB/s
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
Downloading urllib3-1.25.9-py2.py3-none-any.whl (126 kB)
|████████████████████████████████| 126 kB 1.4 MB/s
Collecting idna<3,>=2.5
Downloading idna-2.9-py2.py3-none-any.whl (58 kB)
|████████████████████████████████| 58 kB 2.6 MB/s
Building wheels for collected packages: Kivy-Garden
Building wheel for Kivy-Garden (setup.py) ... done
Created wheel for Kivy-Garden: filename=Kivy_Garden-0.1.4-py3-none-any.whl size=4531 sha256=82cff79dc1b1e0b1bff1082ed3bb7ff9af219fb16db54f7537cb35cba784cb3b
Stored in directory: /Users/shilpimittal/Library/Caches/pip/wheels/3f/43/e3/50289d555356f0421d1c388c82d052d5788f22a34d0cd8659d
Successfully built Kivy-Garden
Installing collected packages: certifi, chardet, urllib3, idna, requests, Kivy-Garden, pygments, docutils, kivy
Successfully installed Kivy-Garden-0.1.4 certifi-2020.4.5.1 chardet-3.0.4 docutils-0.16 idna-2.9 kivy-1.11.1 pygments-2.6.1 requests-2.23.0 urllib3-1.25.9
(kivyenv) Shilpis-Air:kivyHelloWorld shilpimittal$ python main.py
Refer https://kivy.org/doc/stable/guide/basic.html#
First code
(KivyTrialVenv) (base) Deepaks-MacBook-Air:KivyTrial deepak$ cat main.py
import kivy
kivy.require('1.0.6') # replace with your current kivy version !
from kivy.app import App
from kivy.uix.label import Label
class MyApp(App):
def build(self):
return Label(text='Hello world')
if __name__ == '__main__':
MyApp().run()
(KivyTrialVenv) (base) Deepaks-MacBook-Air:KivyTrial deepak$ python3 main.py
[INFO ] [Logger ] Record log in /Users/deepak/.kivy/logs/kivy_20-04-20_8.txt
[INFO ] [Kivy ] v1.11.1
[INFO ] [Kivy ] Installed at "/Users/deepak/Documents/coding/python/android/KivyTrialVenv/lib/python3.6/site-packages/kivy/__init__.py"
[INFO ] [Python ] v3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 03:03:55)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)]
[INFO ] [Python ] Interpreter at "/Users/deepak/Documents/coding/python/android/KivyTrialVenv/bin/python3"
[INFO ] [Factory ] 184 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_imageio, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
[INFO ] [Text ] Provider: sdl2
[INFO ] [Window ] Provider: sdl2
[INFO ] [GL ] Using the "OpenGL ES 2" graphics system
[INFO ] [GL ] Backend used <sdl2>
[INFO ] [GL ] OpenGL version <b'2.1 INTEL-14.0.69'>
[INFO ] [GL ] OpenGL vendor <b'Intel Inc.'>
[INFO ] [GL ] OpenGL renderer <b'Intel(R) HD Graphics 6000'>
[INFO ] [GL ] OpenGL parsed version: 2, 1
[INFO ] [GL ] Shading version <b'1.20'>
[INFO ] [GL ] Texture max size <16384>
[INFO ] [GL ] Texture max units <16>
[INFO ] [Window ] auto add sdl2 input provider
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[INFO ] [Base ] Start application main loop
[INFO ] [GL ] NPOT texture support is available
[INFO ] [WindowSDL ] exiting mainloop and closing.
[INFO ] [Base ] Leaving application in progress...
(KivyTrialVenv) (base) Deepaks-MacBook-Air:KivyTrial deepak$
Refer https://kivy.org/doc/stable/guide/packaging-android.html#packaging-android
Pre-requisites for Buildozer
https://buildozer.readthedocs.io/en/latest/installation.html#targeting-android
Install Xcode
command line tool (via xcode-select --install) Refer: https://stackoverflow.com/questions/9329243/how-to-install-xcode-command-line-tools
Install buildozer
Its one time activity per MacOS
Buildozer installation
git clone https://github.com/kivy/buildozer.gitcd buildozersudo python setup.py install
(kivyenv) Shilpis-Air:buildozer shilpimittal$ python setup.py install
/Users/shilpimittal/Documents/coding/python/android/kivyenv/lib/python3.7/site-packages/setuptools/dist.py:454: UserWarning: Normalizing '1.0.1-dev0' to '1.0.1.dev0'
warnings.warn(tmpl.format(**locals()))
running install
running bdist_egg
running egg_info
.....
Adding zipp 3.1.0 to easy-install.pth file
Installed /Users/shilpimittal/Documents/coding/python/android/kivyenv/lib/python3.7/site-packages/zipp-3.1.0-py3.7.egg
Finished processing dependencies for buildozer==1.0.1.dev0
(kivyenv) Shilpis-Air:buildozer shilpimittal$ pwd
Refer here
Below is the success log once Buildozer command succeeds.
Please refer below list of errors before success.
Success log
(kivyenv) Shilpis-Air:kivyHelloWorld shilpimittal$ buildozer android debug deploy run
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Preparing build
# Check requirements for android
# Search for Git (git)
....
....
.....
[INFO]: # APK renamed to kivyHello__armeabi-v7a-debug-0.1-.apk
[DEBUG]: -> running cp /Users/shilpimittal/Documents/coding/python/android/kivyHelloWorld/.buildozer/android/platform/build-armeabi-v7a/dists/kivyHello__armeabi-v7a/build/outputs/apk/debug/kivyHello__armeabi-v7a-debug.apk kivyHello__armeabi-v7a-debug-0.1-.apk
WARNING: Received a --sdk argument, but this argument is deprecated and does nothing.
No compiled python is present to zip, skipping.
No setup.py/pyproject.toml used, copying full private data into .apk.
Applying Java source code patches...
Applying patch: src/patches/SDLActivity.java.patch
# Android packaging done!
# APK kivyHello-0.1-armeabi-v7a-debug.apk available in the bin directory
# Run '/Users/shilpimittal/.buildozer/android/platform/android-sdk/platform-tools/adb devices'
# Cwd None
* daemon not running; starting now at tcp:5037
* daemon started successfully
List of devices attached
# Application pushed.
# Application started.
(kivyenv) Shilpis-Air:kivyHelloWorld shilpimittal$ ls
Check APK is created or not
Check APK is created
(kivyenv) Shilpis-Air:kivyHelloWorld shilpimittal$ ls -ltrh
total 32
-rw-r--r-- 1 shilpimittal staff 266B Apr 21 12:59 main.py
-rw-r--r-- 1 shilpimittal staff 10K Apr 21 13:08 buildozer.spec
drwxr-xr-x 3 shilpimittal staff 96B Apr 21 15:10 bin
(kivyenv) Shilpis-Air:kivyHelloWorld shilpimittal$ ls -ltrh bin/
total 25376
-rw-r--r-- 1 shilpimittal staff 12M Apr 21 15:10 kivyHello-0.1-armeabi-v7a-debug.apk
Install ADB if not by referring here
Use add push command for storing apk to mobile and then click apk on mobile for installation
You can see same Hello World screen in the mobile as well as shown in below screenshot.
Advanced code output is as below
Refer code at https://kivy.org/doc/stable/tutorials/pong.html
Error while 'python setup.py install'
(kivyenv) Shilpis-Air:buildozer shilpimittal$ python setup.py install
/Users/shilpimittal/Documents/coding/python/android/kivyenv/lib/python3.7/site-packages/setuptools/dist.py:454: UserWarning: Normalizing '1.0.1-dev0' to '1.0.1.dev0'
warnings.warn(tmpl.format(**locals()))
running install
....
....
# Create directory /Users/shilpimittal/.buildozer/android/platform/android/platform
# Create directory /Users/shilpimittal/Documents/coding/python/android/kivyHelloWorld/.buildozer/android/platform
# Create directory /Users/shilpimittal/Documents/coding/python/android/kivyHelloWorld/.buildozer/android/app
# Check configuration tokens
# Read available permissions from api-versions.xml
# Preparing build
# Check requirements for android
# Search for Git (git)
# -> found at /usr/bin/git
# Search for Cython (cython)
# Cython (cython) not found, please install it.
(kivyenv) Shilpis-Air:kivyHelloWorld shilpimittal$ pip install Cython
Collecting Cython
Downloading Cython-0.29.16-cp37-cp37m-macosx_10_9_x86_64.whl (1.9 MB)
|████████████████████████████████| 1.9 MB 657 kB/s
Installing collected packages: Cython
Successfully installed Cython-0.29.16
Its Java error
Error for 'buildozer android debug deploy run'
(kivyenv) Shilpis-Air:kivyHelloWorld shilpimittal$ buildozer android debug deploy run
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Read available permissions from api-versions.xml
# Preparing build
# Check requirements for android
# Search for Git (git)
# -> found at /usr/bin/git
# Search for Cython (cython)
# -> found at /Users/shilpimittal/Documents/coding/python/android/kivyenv/bin/cython
# Search for Java compiler (javac)
# -> found at /System/Library/Frameworks/JavaVM.framework/Versions/A/Commands/javac
# Search for Java keytool (keytool)
# -> found at /System/Library/Frameworks/JavaVM.framework/Versions/A/Commands/keytool
# Install platform
# Run 'git config --get remote.origin.url'
# Cwd /Users/shilpimittal/Documents/coding/python/android/kivyHelloWorld/.buildozer/android/platform/python-for-android
https://github.com/kivy/python-for-android.git
# Run 'git branch -vv'
# Cwd /Users/shilpimittal/Documents/coding/python/android/kivyHelloWorld/.buildozer/android/platform/python-for-android
* master 8cf66cc1 [origin/master] Merge pull request #2111 from kivy/release-2020.03.30
# Run '/Users/shilpimittal/Documents/coding/python/android/kivyenv/bin/python -m pip install -q \'appdirs\' \'colorama>=0.3.3\' \'jinja2\' \'six\' \'enum34; python_version<"3.4"\' \'sh>=1.10; sys_platform!="nt"\' \'pep517<0.7.0"\' \'pytoml\' \'virtualenv<20\''
# Cwd None
# Apache ANT found at /Users/shilpimittal/.buildozer/android/platform/apache-ant-1.9.4
# Android SDK found at /Users/shilpimittal/.buildozer/android/platform/android-sdk
# Recommended android's NDK version by p4a is: 19b
# Android NDK found at /Users/shilpimittal/.buildozer/android/platform/android-ndk-r19b
# Installing/updating SDK platform tools if necessary
# Run '/Users/shilpimittal/.buildozer/android/platform/android-sdk/tools/bin/sdkmanager tools platform-tools'
# Cwd /Users/shilpimittal/.buildozer/android/platform/android-sdk
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 5 more
# Command failed: /Users/shilpimittal/.buildozer/android/platform/android-sdk/tools/bin/sdkmanager tools platform-tools
# ENVIRONMENT:
# TERM_PROGRAM = 'Apple_Terminal'
# TERM = 'xterm-256color'
# SHELL = '/bin/bash'
# TMPDIR = '/var/folders/cn/7_nrqww11516vfy1ykwtvzp40000gn/T/'
# TERM_PROGRAM_VERSION = '433'
# OLDPWD = '/Users/shilpimittal/Documents/coding/python/android'
# TERM_SESSION_ID = 'BCEA0996-DAE4-4E7E-A0CB-7CCB87805D5D'
# USER = 'shilpimittal'
# SSH_AUTH_SOCK = '/private/tmp/com.apple.launchd.sgF15wOhll/Listeners'
# VIRTUAL_ENV = '/Users/shilpimittal/Documents/coding/python/android/kivyenv'
# PATH = '/Users/shilpimittal/.buildozer/android/platform/apache-ant-1.9.4/bin:/Users/shilpimittal/Documents/coding/python/android/kivyenv/bin:/bin:/usr/local/go/bin:/anaconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Library/Apple/usr/bin'
# LaunchInstanceID = 'D5B5C54A-FE97-48D2-B5C5-4293EF30CDC5'
# PWD = '/Users/shilpimittal/Documents/coding/python/android/kivyHelloWorld'
# XPC_FLAGS = '0x0'
# PS1 = '(kivyenv) \\h:\\W \\u\\$ '
# XPC_SERVICE_NAME = '0'
# HOME = '/Users/shilpimittal'
# SHLVL = '1'
# GOROOT = '/usr/local/go'
# LOGNAME = 'shilpimittal'
# LC_CTYPE = 'UTF-8'
# SECURITYSESSIONID = '186a6'
# _ = '/Users/shilpimittal/Documents/coding/python/android/kivyenv/bin/buildozer'
# __CF_USER_TEXT_ENCODING = '0x1F5:0x0:0x0'
#
# 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
(kivyenv) Shilpis-Air:kivyHelloWorld shilpimittal$
Fix: Change the Java version in macOs to Java-8 (https://github.com/kivy/buildozer/issues/922#issuecomment-541100450)
To downgrade Java, please use following commands
$/usr/libexec/java_home -V
$export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
Refer https://stackoverflow.com/questions/46513639/how-to-downgrade-java-from-9-to-8-on-a-macos-eclipse-is-not-running-with-java-9
Its autoconf error
Error while buildozer android debug deploy run
(kivyenv) Shilpis-Air:kivyHelloWorld shilpimittal$ buildozer android debug deploy run
# Check configuration tokens
# Ensure build layout
# Check configuration tokens
# Preparing build
# Check requirements for android
....
configure.ac:41: error: possibly undefined macro: AC_PROG_LIBTOOL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure:7685: error: possibly undefined macro: AC_PROG_LD
autoreconf: /usr/local/Cellar/autoconf/2.69/bin/autoconf failed with exit status: 1
STDERR:
# Command failed: /Users/shilpimittal/Documents/coding/python/android/kivyenv/bin/python -m pythonforandroid.toolchain create --dist_name=kivyHello --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/Users/shilpimittal/Documents/coding/python/android/kivyHelloWorld/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21
# ENVIRONMENT:
# TERM_PROGRAM = 'Apple_Terminal'
# TERM = 'xterm-256color'
# SHELL = '/bin/bash'
# TMPDIR = '/var/folders/cn/7_nrqww11516vfy1ykwtvzp40000gn/T/'
# TERM_PROGRAM_VERSION = '433'
# OLDPWD = '/Users/shilpimittal/Documents/coding/python/android/buildozer/buildozer'
# TERM_SESSION_ID = 'BCEA0996-DAE4-4E7E-A0CB-7CCB87805D5D'
# USER = 'shilpimittal'
# SSH_AUTH_SOCK = '/private/tmp/com.apple.launchd.sgF15wOhll/Listeners'
# VIRTUAL_ENV = '/Users/shilpimittal/Documents/coding/python/android/kivyenv'
# PATH = '/Users/shilpimittal/.buildozer/android/platform/apache-ant-1.9.4/bin:/Users/shilpimittal/Documents/coding/python/android/kivyenv/bin:/bin:/usr/local/go/bin:/anaconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Library/Apple/usr/bin'
# LaunchInstanceID = 'D5B5C54A-FE97-48D2-B5C5-4293EF30CDC5'
# PWD = '/Users/shilpimittal/Documents/coding/python/android/kivyHelloWorld'
# JAVA_HOME = '/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home'
# XPC_FLAGS = '0x0'
# PS1 = '(kivyenv) \\h:\\W \\u\\$ '
# XPC_SERVICE_NAME = '0'
# HOME = '/Users/shilpimittal'
# SHLVL = '1'
# GOROOT = '/usr/local/go'
# LOGNAME = 'shilpimittal'
# LC_CTYPE = 'UTF-8'
# SECURITYSESSIONID = '186a6'
# _ = '/Users/shilpimittal/Documents/coding/python/android/kivyenv/bin/buildozer'
# __CF_USER_TEXT_ENCODING = '0x1F5:0x0:0x0'
# PACKAGES_PATH = '/Users/shilpimittal/.buildozer/android/packages'
# ANDROIDSDK = '/Users/shilpimittal/.buildozer/android/platform/android-sdk'
# ANDROIDNDK = '/Users/shilpimittal/.buildozer/android/platform/android-ndk-r19b'
# ANDROIDAPI = '27'
# ANDROIDMINAPI = '21'
#
# 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
(kivyenv) Shilpis-Air:kivyHelloWorld shilpimittal$ brew install autogen autoconf libtool
Fix: Install autogen autoconf libtool
Ref: https://github.com/hishamhm/htop/issues/439
Installation of autogen autoconf libtool
(kivyenv) Shilpis-Air:kivyHelloWorld shilpimittal$ brew install autogen autoconf libtool
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
==> Updated Casks
memory-map omnifocus xaos
Warning: autoconf 2.69 is already installed and up-to-date
To reinstall 2.69, run `brew reinstall autoconf`
==> Installing dependencies for autogen: bdw-gc, gmp, libtool, libunistring and guile
==> Installing autogen dependency: bdw-gc
==> Downloading https://homebrew.bintray.com/bottles/bdw-gc-8.0.4.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/3c/3c8765da91b046c3ab3f73fb00f885608dc4d8415071ca0170f4aa7b1048a6bf?__gda__=exp=1587461807~hmac=6e273fa7e11fda04ae9a09f5320b61ab321541a208db23b216706f406c7
######################################################################## 100.0%
==> Pouring bdw-gc-8.0.4.catalina.bottle.tar.gz
🍺 /usr/local/Cellar/bdw-gc/8.0.4: 69 files, 1.5MB
==> Installing autogen dependency: gmp
==> Downloading https://homebrew.bintray.com/bottles/gmp-6.2.0.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/2e/2e6acd6e62d1b8ef0800061e113aea30a63f56b32b99c010234c0420fd6d3ecf?__gda__=exp=1587461810~hmac=a2a7323b8d6959e175795a0411a8b1c59d8b0aeaef24d01834df77985df
######################################################################## 100.0%
==> Pouring gmp-6.2.0.catalina.bottle.tar.gz
🍺 /usr/local/Cellar/gmp/6.2.0: 20 files, 3.2MB
==> Installing autogen dependency: libtool
==> Downloading https://homebrew.bintray.com/bottles/libtool-2.4.6_1.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/38/38212486e78db33048438cffe38b6914f13553e7bb8c7d3d2fbecb18a6481d3c?__gda__=exp=1587461813~hmac=2a7d9a9cb3b8bb40c039a2f18181c3eb7c86435dbf722c0388576da8165
######################################################################## 100.0%
==> Pouring libtool-2.4.6_1.catalina.bottle.tar.gz
==> Caveats
In order to prevent conflicts with Apple's own libtool we have prepended a "g"
so, you have instead: glibtool and glibtoolize.
==> Summary
🍺 /usr/local/Cellar/libtool/2.4.6_1: 71 files, 3.7MB
==> Installing autogen dependency: libunistring
==> Downloading https://homebrew.bintray.com/bottles/libunistring-0.9.10.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/ce/ce746662b98d93511b86920011b5cafcd2eecbce4c9c40d8c52a143cdf708456?__gda__=exp=1587461816~hmac=6e3d66d0974850346a1d8bcbf2fac0e240fb9ea2875f29262dc2c992397
######################################################################## 100.0%
==> Pouring libunistring-0.9.10.catalina.bottle.tar.gz
🍺 /usr/local/Cellar/libunistring/0.9.10: 54 files, 4.4MB
==> Installing autogen dependency: guile
==> Downloading https://homebrew.bintray.com/bottles/guile-2.2.7_2.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/60/6079cc2f9949612e7e7b020240b0075d4fdbdef59847c21a12f39ada6c0b6ab1?__gda__=exp=1587461819~hmac=6bf1a644b7096f94e850324a512c15de3e6e8d0a47c8530f5cbd7e414eb
######################################################################## 100.0%
==> Pouring guile-2.2.7_2.catalina.bottle.tar.gz
🍺 /usr/local/Cellar/guile/2.2.7_2: 786 files, 51.6MB
==> Installing autogen
==> Downloading https://homebrew.bintray.com/bottles/autogen-5.18.16.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/e1/e103302688bc9f7e4493c8827133f3341ab701740249196ddbfc2f2cf4fc1246?__gda__=exp=1587461826~hmac=22e9b16b07328aff3b9dbd994463e4a877b4675a8174d971bdfe795c5df
######################################################################## 100.0%
==> Pouring autogen-5.18.16.catalina.bottle.tar.gz
🍺 /usr/local/Cellar/autogen/5.18.16: 101 files, 1.9MB
==> Caveats
==> libtool
In order to prevent conflicts with Apple's own libtool we have prepended a "g"
so, you have instead: glibtool and glibtoolize.
OSError: [Errno socket error] [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1076)
Fix: Yet to find
WRONG_VERSION_NUMBER error
id', 'kivy']
[INFO]: The requirements (certifi) were not found as recipes, they will be installed with pip.
[INFO]: # Downloading recipes
[INFO]: Downloading hostpython3
[INFO]: -> running mkdir -p /Users/shilpimittal/Documents/coding/python/android/kivytwitter/test/.buildozer/android/platform/build-armeabi-v7a/packages/hostpython3
[INFO]: -> directory context /Users/shilpimittal/Documents/coding/python/android/kivytwitter/test/.buildozer/android/platform/build-armeabi-v7a/packages/hostpython3
[INFO]: -> running basename https://www.python.org/ftp/python/3.8.1/Python-3.8.1.tgz
[INFO]: hostpython3 download already cached, skipping
[INFO]: <- directory context /Users/shilpimittal/Documents/coding/python/android/kivytwitter/test/.buildozer/android/platform/python-for-android
[INFO]: Downloading libffi
[INFO]: -> running mkdir -p /Users/shilpimittal/Documents/coding/python/android/kivytwitter/test/.buildozer/android/platform/build-armeabi-v7a/packages/libffi
[INFO]: -> directory context /Users/shilpimittal/Documents/coding/python/android/kivytwitter/test/.buildozer/android/platform/build-armeabi-v7a/packages/libffi
[INFO]: -> running basename https://github.com/libffi/libffi/archive/8fa8837.tar.gz
[INFO]: libffi download already cached, skipping
[INFO]: <- directory context /Users/shilpimittal/Documents/coding/python/android/kivytwitter/test/.buildozer/android/platform/python-for-android
[INFO]: Downloading openssl
[INFO]: -> running mkdir -p /Users/shilpimittal/Documents/coding/python/android/kivytwitter/test/.buildozer/android/platform/build-armeabi-v7a/packages/openssl
[INFO]: -> directory context /Users/shilpimittal/Documents/coding/python/android/kivytwitter/test/.buildozer/android/platform/build-armeabi-v7a/packages/openssl
[INFO]: -> running basename https://www.openssl.org/source/openssl-1.1.1f.tar.gz
[INFO]: openssl download already cached, skipping
[INFO]: <- directory context /Users/shilpimittal/Documents/coding/python/android/kivytwitter/test/.buildozer/android/platform/python-for-android
[INFO]: Downloading sdl2_image
[INFO]: -> running mkdir -p /Users/shilpimittal/Documents/coding/python/android/kivytwitter/test/.buildozer/android/platform/build-armeabi-v7a/packages/sdl2_image
[INFO]: -> directory context /Users/shilpimittal/Documents/coding/python/android/kivytwitter/test/.buildozer/android/platform/build-armeabi-v7a/packages/sdl2_image
[INFO]: -> running basename https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.4.tar.gz
[INFO]: -> running rm -f .mark-SDL2_image-2.0.4.tar.gz
[INFO]: Downloading sdl2_image from https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.4.tar.gz
Traceback (most recent call last):
File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1758, in open
return getattr(self, name)(url)
File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1967, in open_https
return self._open_generic_http(self._https_connection, url, data)
File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1916, in _open_generic_http
http_conn.request("GET", selector, headers=headers)
File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1252, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1298, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1247, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1026, in _send_output
self.send(msg)
File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 966, in send
self.connect()
File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1422, in connect
server_hostname=server_hostname)
File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 423, in wrap_socket
session=session
File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 870, in _create
self.do_handshake()
File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 1139, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1076)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/shilpimittal/Documents/coding/python/android/kivytwitter/test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 1231, in <module>
main()
File "/Users/shilpimittal/Documents/coding/python/android/kivytwitter/test/.buildozer/android/platform/python-for-android/pythonforandroid/entrypoints.py", line 18, in main
ToolchainCL()
File "/Users/shilpimittal/Documents/coding/python/android/kivytwitter/test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 688, in __init__
getattr(self, command)(args)
File "/Users/shilpimittal/Documents/coding/python/android/kivytwitter/test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 154, in wrapper_func
build_dist_from_args(ctx, dist, args)
File "/Users/shilpimittal/Documents/coding/python/android/kivytwitter/test/.buildozer/android/platform/python-for-android/pythonforandroid/toolchain.py", line 208, in build_dist_from_args
args, "ignore_setup_py", False
File "/Users/shilpimittal/Documents/coding/python/android/kivytwitter/test/.buildozer/android/platform/python-for-android/pythonforandroid/build.py", line 551, in build_recipes
recipe.download_if_necessary()
File "/Users/shilpimittal/Documents/coding/python/android/kivytwitter/test/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 347, in download_if_necessary
self.download()
File "/Users/shilpimittal/Documents/coding/python/android/kivytwitter/test/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 393, in download
self.download_file(self.versioned_url, filename)
File "/Users/shilpimittal/Documents/coding/python/android/kivytwitter/test/.buildozer/android/platform/python-for-android/pythonforandroid/recipe.py", line 208, in download_file
urlretrieve(url, target, report_hook)
File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1792, in retrieve
fp = self.open(url, data)
File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1764, in open
raise OSError('socket error', msg).with_traceback(sys.exc_info()[2])
File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1758, in open
return getattr(self, name)(url)
File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1967, in open_https
return self._open_generic_http(self._https_connection, url, data)
File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1916, in _open_generic_http
http_conn.request("GET", selector, headers=headers)
File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1252, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1298, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1247, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1026, in _send_output
self.send(msg)
File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 966, in send
self.connect()
File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/client.py", line 1422, in connect
server_hostname=server_hostname)
File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 423, in wrap_socket
session=session
File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 870, in _create
self.do_handshake()
File "/usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ssl.py", line 1139, in do_handshake
self._sslobj.do_handshake()
OSError: [Errno socket error] [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1076)
Download failed retrying in a second...Download failed retrying in a second...Download failed retrying in a second...Download failed retrying in a second...# Command failed: /Users/shilpimittal/Documents/coding/python/android/kivyenv/bin/python -m pythonforandroid.toolchain create --dist_name=myapp --bootstrap=sdl2 --requirements=python3,kivy --arch armeabi-v7a --copy-libs --color=always --storage-dir="/Users/shilpimittal/Documents/coding/python/android/kivytwitter/test/.buildozer/android/platform/build-armeabi-v7a" --ndk-api=21
# ENVIRONMENT:
# TERM_PROGRAM = 'Apple_Terminal'
# TERM = 'xterm-256color'
# SHELL = '/bin/bash'
# TMPDIR = '/var/folders/cn/7_nrqww11516vfy1ykwtvzp40000gn/T/'
# TERM_PROGRAM_VERSION = '433'
# OLDPWD = '/Users/shilpimittal/Documents/coding/python/android/KivyPongGame'
# TERM_SESSION_ID = '9ACDB497-7E66-4776-974D-25E6C83C06D3'
# USER = 'shilpimittal'
# SSH_AUTH_SOCK = '/private/tmp/com.apple.launchd.e8HipK9TTY/Listeners'
# VIRTUAL_ENV = '/Users/shilpimittal/Documents/coding/python/android/kivyenv'
# PATH = '/Users/shilpimittal/.buildozer/android/platform/apache-ant-1.9.4/bin:/Users/shilpimittal/Documents/coding/python/android/kivyenv/bin:/bin:/usr/local/go/bin:/anaconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Library/Apple/usr/bin'
# LaunchInstanceID = '5A03CAE0-8227-47CA-A463-9CBE722F4DB9'
# PWD = '/Users/shilpimittal/Documents/coding/python/android/kivytwitter/test'
# JAVA_HOME = '/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home'
# XPC_FLAGS = '0x0'
# PS1 = '(kivyenv) \\h:\\W \\u\\$ '
# XPC_SERVICE_NAME = '0'
# HOME = '/Users/shilpimittal'
# SHLVL = '1'
# GOROOT = '/usr/local/go'
# LOGNAME = 'shilpimittal'
# LC_CTYPE = 'UTF-8'
# SECURITYSESSIONID = '18701'
# _ = '/Users/shilpimittal/Documents/coding/python/android/kivyenv/bin/buildozer'
# __CF_USER_TEXT_ENCODING = '0x1F5:0x0:0x0'
# PACKAGES_PATH = '/Users/shilpimittal/.buildozer/android/packages'
# ANDROIDSDK = '/Users/shilpimittal/.buildozer/android/platform/android-sdk'
# ANDROIDNDK = '/Users/shilpimittal/.buildozer/android/platform/android-ndk-r19c'
# ANDROIDAPI = '27'
# ANDROIDMINAPI = '21'
#
# 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
https://kivy.org/doc/stable/gettingstarted/installation.html#
https://realpython.com/mobile-app-kivy-python/
https://kivy.org/#home