Using Kivy
Install Kivy:
bashpip install kivy
Create a Basic App:
pythonfrom kivy.app import App from kivy.uix.label import Label class MyApp(App): def build(self): return Label(text='Hello, Kivy!') if __name__ == '__main__': MyApp().run()
Run the App:
bashpython main.py
Package for Mobile:
- For Android, use Buildozer:bash
pip install buildozer buildozer init buildozer -v android debug
- For iOS, use Xcode along with Kivy-ios.
- For Android, use Buildozer:
Using BeeWare
Install BeeWare:
bashpip install beeware
Create a New Project:
bashbriefcase new
Run the App:
bashcd myproject briefcase dev
Package for Mobile:
- For Android:bash
briefcase create android briefcase build android briefcase run android
- For iOS:bash
briefcase create ios briefcase build ios briefcase run ios
This is How you can create a Mobile App Using Python 🐍
0 Comments