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/05 11:25] – [Kivy Comment créer une application android en python] 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 box 80% centeralign> | + | |
+ | <WRAP center round alert 60%> | ||
+ | **Cette page est obsolète, elle est en archives !** | ||
+ | |||
+ | Voir **[[:: | ||
+ | </ | ||
+ | |||
+ | <WRAP center round box 60% centeralign> | ||
**{{tagpage> | **{{tagpage> | ||
</ | </ | ||
- | <WRAP center round info 60%> | + | <WRAP center round important |
- | Buildozer | + | **Buildozer |
- | Et essayé un tas de trucs en 2018 sans succès ! La doc est confuse, il n' | + | **Mais je n'ai pas réussi à obtenir un *.apk** |
+ | Et ça ne marche pas non plus en python 2 ! | ||
+ | </ | ||
- | ** Quelle version installer ou utiliser ?** | + | <WRAP center round info 60% centeralign> |
- | * cython ou cython3 | + | Testé en janvier 2019 sur:\\ |
- | | + | **Debian Buster alpha 4**\\ |
- | * Android API ? SDK ? NDK ? | + | et sur \\ |
+ | **Xubuntu 18.04 dans VirtualBox** | ||
</ | </ | ||
- | **Qu'en disent les internets ?** | + | =====Buildozer et python 3===== |
+ | **[[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 | ||
+ | |||
+ | Last but not least, un tas de package python ne sont pas supportés. | ||
+ | |||
+ | * [[https:// | ||
+ | * [[http:// | ||
+ | * [[https:// | ||
+ | |||
+ | =====Les problèmes avec buildozer en décembre 2018===== | ||
* [[https:// | * [[https:// | ||
* [[https:// | * [[https:// | ||
Ligne 21: | Ligne 42: | ||
* [[https:// | * [[https:// | ||
* [[https:// | * [[https:// | ||
- | ===== Python-for-Android ===== | ||
- | * **[[https:// | ||
- | ====Sur Github dans le projet Kivy==== | ||
- | Python-for-Android est un emballeur pour les applications Python sur Android. Vous pouvez créer votre propre distribution Python, y compris les modules et dépendances de votre choix, et la regrouper dans un APK avec votre propre code. | ||
- | Les fonctionnalités incluent: | + | ====Quel Cython ?==== |
- | * Prise en charge | + | **[[https:// |
- | * Différents moteurs d' | + | |
- | * Prise en charge automatique de la plupart | + | * cython ou cython3 et quelle version ? |
- | * Cibles d'architecture multiples, pour les APK optimisés sur n'importe quel appareil. | + | * buildozer |
+ | |||
+ | ====Quelle version de SDK, NDK et ANDROID API ?==== | ||
+ | * **[[https:// | ||
+ | |||
+ | =====Hello World sur debian buster | ||
+ | ====Installation | ||
+ | < | ||
+ | sudo apt-get install caja-open-terminal geany geany-plugins git gnome-system-tools locales | ||
+ | |||
+ | sudo dpkg --add-architecture i386 | ||
+ | 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: | ||
+ | |||
+ | sudo pip3 install jinja2 appdirs sh colorama setuptools cython | ||
+ | sudo pip3 install pygame kivy buildozer pyjnius | ||
+ | </ | ||
+ | |||
+ | ====Version==== | ||
+ | * cython | ||
+ | * kivy 1.10.1 | ||
+ | * buildozer 0.35 | ||
+ | * pygame-1.9.4 | ||
+ | ====Fichiers==== | ||
+ | <file python main.py> | ||
+ | #! / | ||
+ | # -*- coding: utf-8 -*- | ||
+ | |||
+ | import kivy | ||
+ | kivy.require('1.10.1') | ||
+ | |||
+ | 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> | ||
+ | [app] | ||
+ | title = My Application | ||
+ | package.name = myapp | ||
+ | package.domain = org.test | ||
+ | source.dir = . | ||
+ | build_dir = / | ||
+ | source.include_exts = py, | ||
+ | version = 3.00 | ||
+ | requirements = python3, | ||
+ | orientation = portrait | ||
+ | fullscreen = 0 | ||
+ | android.arch = armeabi-v7a | ||
+ | |||
+ | android.api = 24 | ||
+ | android.sdk = 20 | ||
+ | android.ndk = 14b | ||
+ | android.ndk_path = / | ||
+ | android.sdk_path = / | ||
- | Pour la documentation et le support, voir: | + | [buildozer] |
- | * Site Web: http:// | + | log_level = 2 |
- | * Liste de diffusion: https:// | + | warn_on_root = 1 |
+ | </file> | ||
- | En 2015, ces outils ont été réécrits pour fournir | + | =====Hello World sur Xubuntu 18.04 avec python 3.6.7 dans une VirtualBox===== |
+ | ** Problème: ce n'est pas python3.7 !!!** | ||
- | =====Premiers tests===== | + | ====Installation de buildozer à partir de la branche master sur github==== |
- | ==== Hello World ==== | + | sudo pip3 install https:// |
+ | installe buildozer 0.38 dev0 | ||
- | ====WIKIKIRC en python 3==== | + | sudo pip3 install git+https:// |
- | * https:// | + | Successfully installed Kivy-1.11.0.dev0 |
+ | ===== Kivy Virtual Machine (for Android/ | ||
+ | * Voir ** [[https:// | ||
- | =====Solutions propriétaires===== | + | ===== Des applications réussies jusqu' |
- | * [[http://qpy.io/price/|QPython]] et sur [[https:// | + | |
+ | * **[[: | ||
+ | * **[[https:// | ||
+ | * **[[https:// | ||
+ | * **[[https:// | ||
+ | * **[[https:// | ||
+ | * **[[https:// | ||
+ | * **[[https:// | ||
- | {{tag>kivy sb p4a}} | + | {{tag>archive |
archives/kivy_comment_creer_une_application_android_en_python.1546687525.txt.gz · Dernière modification : 2019/01/05 11:25 de serge