I have been trying to build Python 3.3.2 for android but I have run into a dead end. I might be doing something wrong.
Here is my buildscript:
# Unpa
FWIW I was able to get Python 3.5 on android via kivy/buildozer + crystax (place crystax in ~/.buildozer/crystax-ndk-10.3.2
)
Install Android Studio so you have adb
at the command line.
Python 3.5 in Ubuntu 18.04
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt install python3.5
Get the latest and greatest buildozer (required for python3 in Fall 2018)
sudo -H pip install git+https://github.com/kivy/buildozer
Make a little testbed
mkdir py3android
cd py3android
mkdir src
src/main.py
from kivy.app import App
from kivy.uix.button import Button
class TestApp(App):
def build(self):
return Button(text='Hello World')
TestApp().run()
buildozer.spec (Run buildozer init
to create a skeleton first)
[app]
title = My App
package.name = myapp
package.domain = com.mycompany
source.dir = ./src
source.include_exts = py,png,jpg
source.include_patterns = img/
version = 0.1
requirements = python3crystax,kivy,git+git://github.com/wolfgangp/python-for-android
orientation = portrait
osx.python_version = 3
osx.kivy_version = 1.9.1
fullscreen = 0
android.ndk = 10.3.2
android.ndk_path = ~/.buildozer/crystax-ndk-10.3.2
android.entrypoint = org.renpy.android.PythonActivity
[buildozer]
log_level = 2
warn_on_root = 1
The git library wolfgangp/python-for-android
will be removed once this pull request is accepted, then it can be changed to android==master
Then cd py3android
, plug in your physical android device via USB (you can use emulators too btw) and simply run buildozer android debug run logcat | grep -C 50 Traceback
to see your app and print any tracebacks to the log.
You could report this in the issue traker of python http://bugs.python.org/