archives:kivy_comment_creer_une_application_android_en_python
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
kivy_comment_creer_une_application_android_en_python [2019/01/06 16:20] – [SDK NDK API] serge | archives:kivy_comment_creer_une_application_android_en_python [2020/04/03 17:59] (Version actuelle) – serge | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | ======Kivy Comment créer une application android en python====== | + | ======Archives : Kivy Comment créer une application android en python====== |
+ | |||
+ | <WRAP center round alert 60%> | ||
+ | **Cette page est obsolète, elle est en archives !** | ||
+ | |||
+ | Voir **[[:: | ||
+ | </ | ||
<WRAP center round box 60% centeralign> | <WRAP center round box 60% centeralign> | ||
**{{tagpage> | **{{tagpage> | ||
</ | </ | ||
+ | <WRAP center round important 60% centeralign> | ||
+ | **Buildozer compile le Python 3 par défaut !**\\ | ||
+ | **Mais je n'ai pas réussi à obtenir un *.apk** | ||
+ | Et ça ne marche pas non plus en python 2 ! | ||
+ | </ | ||
+ | |||
+ | <WRAP center round info 60% centeralign> | ||
+ | Testé en janvier 2019 sur:\\ | ||
+ | **Debian Buster alpha 4**\\ | ||
+ | et sur \\ | ||
+ | **Xubuntu 18.04 dans VirtualBox** | ||
+ | </ | ||
+ | |||
+ | =====Buildozer et python 3===== | ||
**[[https:// | **[[https:// | ||
- | Buildozer est un des projets de kivy. **Quand ça marche**, c'est super pratique. Cela permet de créer une application Andoid à partir de script python utilisant **[[https:// | + | Buildozer est un des projets de kivy. **Quand ça marche**, c'est super pratique. Cela permet de créer une application Andoid à partir de script python utilisant **[[https:// |
Last but not least, un tas de package python ne sont pas supportés. | Last but not least, un tas de package python ne sont pas supportés. | ||
Ligne 13: | Ligne 34: | ||
* [[http:// | * [[http:// | ||
* [[https:// | * [[https:// | ||
- | =====Les problèmes avec buildozer===== | + | |
- | ====Qu' | + | =====Les problèmes avec buildozer |
* [[https:// | * [[https:// | ||
* [[https:// | * [[https:// | ||
Ligne 22: | Ligne 43: | ||
* [[https:// | * [[https:// | ||
- | ====Cython==== | + | ====Quel Cython |
**[[https:// | **[[https:// | ||
Ligne 28: | Ligne 49: | ||
* buildozer avec pip ou pip3 et quelle version ? | * buildozer avec pip ou pip3 et quelle version ? | ||
- | ====Version | + | ====Quelle version |
- | Dans le wiki Kivy, pages non indexées par les moteurs de recherches | + | * **[[https:// |
- | * **https:// | + | =====Hello World sur debian buster avec python 3.7 dans une VirtualBox===== |
+ | ====Installation des dépendances==== | ||
+ | < | ||
+ | sudo apt-get install caja-open-terminal geany geany-plugins git gnome-system-tools locales | ||
- | =====Test sur debian buster avec python 3.7===== | + | sudo dpkg --add-architecture i386 |
- | ====Cython | + | sudo apt-get update |
- | | + | |
- | | + | sudo apt-get install libsdl2-dev zlib1g-dev pkg-config autoconf automake cmake dkms libtool libsdl2-2.0-0 ccache openjdk-11-jdk unzip ffmpeg libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libportmidi-dev libswscale-dev libavformat-dev libavcodec-dev libgstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good libncurses5: |
- | + | ||
- | ====SDK NDK API===== | + | sudo pip3 install jinja2 appdirs sh colorama setuptools cython |
- | Ne rien télécharger, | + | sudo pip3 install pygame kivy buildozer pyjnius |
+ | </ | ||
+ | |||
+ | ====Version==== | ||
+ | * cython | ||
+ | | ||
+ | | ||
+ | | ||
+ | ====Fichiers==== | ||
+ | <file python main.py> | ||
+ | #! / | ||
+ | # -*- coding: utf-8 -*- | ||
+ | |||
+ | import kivy | ||
+ | kivy.require(' | ||
+ | |||
+ | from kivy.app import App | ||
+ | from kivy.uix.label import Label | ||
+ | |||
+ | class MyApp(App): | ||
+ | def build(self): | ||
+ | return Label(text=' | ||
+ | |||
+ | if __name__ == ' | ||
+ | MyApp().run() | ||
+ | </ | ||
<file python buildozer.spec> | <file python buildozer.spec> | ||
Ligne 55: | Ligne 104: | ||
android.arch = armeabi-v7a | android.arch = armeabi-v7a | ||
- | # dans la famille android, je demande NDK 14b and SDK 20/API 24 | ||
android.api = 24 | android.api = 24 | ||
android.sdk = 20 | android.sdk = 20 | ||
android.ndk = 14b | android.ndk = 14b | ||
+ | android.ndk_path = / | ||
+ | android.sdk_path = / | ||
[buildozer] | [buildozer] | ||
Ligne 64: | Ligne 114: | ||
warn_on_root = 1 | warn_on_root = 1 | ||
</ | </ | ||
+ | |||
+ | =====Hello World sur Xubuntu 18.04 avec python 3.6.7 dans une VirtualBox===== | ||
+ | ** Problème: ce n'est pas python3.7 !!!** | ||
+ | |||
+ | ====Installation de buildozer à partir de la branche master sur github==== | ||
+ | sudo pip3 install https:// | ||
+ | installe buildozer 0.38 dev0 | ||
+ | |||
+ | sudo pip3 install git+https:// | ||
+ | Successfully installed Kivy-1.11.0.dev0 | ||
+ | |||
+ | |||
===== Kivy Virtual Machine (for Android/ | ===== Kivy Virtual Machine (for Android/ | ||
- | * Voir ** [[kivy_virtual_machine_for_android:buildozer|Kivy Virtual Machine (for Android/ | + | * Voir ** [[https:// |
- | ===== Des jeux qui marchent | + | ===== Des applications réussies jusqu' |
* **[[https:// | * **[[https:// | ||
- | * **[[taposc|Kivy: | + | * **[[:taposc|Kivy: |
* **[[https:// | * **[[https:// | ||
* **[[https:// | * **[[https:// | ||
Ligne 75: | Ligne 137: | ||
* **[[https:// | * **[[https:// | ||
* **[[https:// | * **[[https:// | ||
- | * **[[https:// | + | * **[[https:// |
- | {{tag>kivy sb}} | + | {{tag>archive |
archives/kivy_comment_creer_une_application_android_en_python.1546791652.txt.gz · Dernière modification : 2019/01/06 16:20 de serge