Search code examples
androidpython-3.xkivy2d-gamesqpython3

Pygame/Kivy on Android?


So, I'm programming in Python 3.2 on android (the app I'm using is QPython3) and I wonder if I could make a game/app with a graphic interface for android, using only a smartphone. Is it possible? If yes, how do I do that?


Solution

  • It is possible to programm android apps / games in qpython (not in qpython3) with kivy.

    The only problem is that you can't export them as an apk file on your smartphone.

    For that you need a linux PC / laptop.

    How you can programm and run your app/game:

    1. download qpython here

    2. in the app go to qpypi and download kivy

    3. write your first kivy programm in the qpython editor (kivy doc)(Kivy crash course)

    Then you have to add these lines of code above your actual code (in your main.py file) :

    #-*-coding:utf8;-*-
    #qpy:2
    #qpy:kivy
    

    Then you can run your code.

    I hope I could help.