I created a KivyMD app and tried running it on an Android device. The app is a game called COVID Killers. There's a start screen, game screen, and a game over screen. In the start screen you start the game. In the game screen, there are viruses and you have to hit them with bars of soap. In the game over screen there's a game over GIF and you can click a button to restart the game. On an Android device, when I throw a bar of soap the soap goes up to the virus but as soon as it hits the virus the app crashes. I already posted another question about this app KivyMD MDFlatButton not clickable & Kivy ScreenManager not working when I was still coding it. But I fixed the app eventually. So since the app crashes on Android, I looked at the ADB log, and saw this traceback:
07-25 14:24:01.802 14777 14870 I python : Traceback (most recent call last):
07-25 14:24:01.802 14777 14870 I python : File "~/MEGAsync/KivyLab/KivyMD/COVIDKillers/.buildozer/android/app/main.py", line 427, in <module>
07-25 14:24:01.803 14777 14870 I python : File "~/MEGAsync/KivyLab/KivyMD/COVIDKillers/.buildozer/android/platform/build-arm64-v8a/build/python-installs/COVIDKillers/kivy/app.py", line 855, in run
07-25 14:24:01.803 14777 14870 I python : File "~/MEGAsync/KivyLab/KivyMD/COVIDKillers/.buildozer/android/platform/build-arm64-v8a/build/python-installs/COVIDKillers/kivy/base.py", line 504, in runTouchApp
07-25 14:24:01.803 14777 14870 I python : File "~/MEGAsync/KivyLab/KivyMD/COVIDKillers/.buildozer/android/platform/build-arm64-v8a/build/python-installs/COVIDKillers/kivy/core/window/window_sdl2.py", line 747, in mainloop
07-25 14:24:01.803 14777 14870 I python : File "~/MEGAsync/KivyLab/KivyMD/COVIDKillers/.buildozer/android/platform/build-arm64-v8a/build/python-installs/COVIDKillers/kivy/core/window/window_sdl2.py", line 479, in _mainloop
07-25 14:24:01.803 14777 14870 I python : File "~/MEGAsync/KivyLab/KivyMD/COVIDKillers/.buildozer/android/platform/build-arm64-v8a/build/python-installs/COVIDKillers/kivy/base.py", line 348, in idle
07-25 14:24:01.804 14777 14870 I python : File "~/MEGAsync/KivyLab/KivyMD/COVIDKillers/.buildozer/android/platform/build-arm64-v8a/build/python-installs/COVIDKillers/kivy/clock.py", line 598, in tick_draw
07-25 14:24:01.804 14777 14870 I python : File "kivy/_clock.pyx", line 427, in kivy._clock.CyClockBase._process_events_before_frame
07-25 14:24:01.804 14777 14870 I python : File "kivy/_clock.pyx", line 467, in kivy._clock.CyClockBase._process_events_before_frame
07-25 14:24:01.804 14777 14870 I python : File "kivy/_clock.pyx", line 465, in kivy._clock.CyClockBase._process_events_before_frame
07-25 14:24:01.804 14777 14870 I python : File "kivy/_clock.pyx", line 154, in kivy._clock.ClockEvent.tick
07-25 14:24:01.805 14777 14870 I python : File "kivy/_clock.pyx", line 86, in kivy._clock.ClockEvent.get_callback
07-25 14:24:01.805 14777 14870 I python : File "~/MEGAsync/KivyLab/KivyMD/COVIDKillers/.buildozer/android/platform/build-arm64-v8a/build/python-installs/COVIDKillers/kivy/weakmethod.py", line 56, in is_dead
07-25 14:24:01.805 14777 14870 I python : ReferenceError: weakly-referenced object no longer exists
07-25 14:24:01.805 14777 14870 I python : Python for android ended.
There was also a Java error. Since the error is really long, here is a link to it: Java Error
Does anybody know what's causing my app to crash? If anyone needs to view the code of my app, I will leave a link to it.
Thanks in advance!
It turns out one of the elements in my app was dependent on a variable that I deleted later in my program. I've fixed my app now.