Search code examples
python-3.xkivykivy-language

kivy app works on computer but not mobile device


I made a kivy app and ran it on my computer and it works well, i pack it and put it on my android phone and it closes immediately. Also note that i am using the PyCharm IDE

i read another forum and one guy said check for breakpoints, but i have no breakpoints set. the way that i am calling the .kv file is through "name convention" as you will see in the code

main.py:

import socket
from kivy.uix.floatlayout import FloatLayout
from kivy.app import App
from kivy.properties import ObjectProperty

class Make_Client(FloatLayout):
    ...

class ClientApp(App):
    def build(self):
        return Make_Client()

if __name__ == "__main__":
    ClientApp().run()

client.kv:

# File name: main.py

<FloatLayout>:
   ...

Solution

  • I asked a friend and he told me it was the "Android-Manifest.xml" so in my APK packer (buildozer) i had to tell it to ask for the android.permissions.INTERNET and then my app worked on my phone