On Ubuntu
Install kivy with conda:
conda create -n kivy python=3.6 ipython
. activate kivy
conda install kivy -c conda-forge
Create a demo app:
take demoapp
cat << EOF > main.py
from kivy.app import App
from kivy.uix.button import Button
class TestApp(App):
def build(self):
return Button(text="hi sweetie")
TestApp().run()
EOF
cat << EOF > android.txt
title=My Demo App
author=Li Chao
orientation=portrait
EOF
Test the demo with python main.py
(in conda env).
Install FTP client:
ncftp (install with sudo apt install ncftp
) supports tab-completion,
which make the file transfer and manipulation much easier.
On Android Device
Install app Kivy Launcher and 软件数据线 (or Software data cable from Google Play) on the android device.
Firstly upload the project:
On the PC, run the following commands:
$ ncftp -P 8888 192.168.1.2
> cd "/Device Storage (HUAWEI VTR-AL00)"
> mkdir kivy
> exit
$ ncftpput -R -P 8888 192.168.1.2 "/Device Storage (HUAWEI VTR-AL00)/kivy" demoapp
Now run the demo on your android device by startting the Kivy Launcher and choose the demoapp in the list.