0

I can access MySQL on my other laptops at home, but when I converted my py file to apk, my app crashed when I hit the button connected to my database. I put my computer IP (host) in the code and gave all privilege grants to that user. I have also given permission to the internet in the buildozer.spec file. Still my application is crashes, what should I do?

I tried accessing mysql data to my other computers at home they work fine, but here I am creating an applications with kivy python its crash when I try to access database. I am using IP address to connect to data base and also check that there is not firewall. I am using macbook air and trying to run my apk file into one plus which is running android 12.

Link for my all code & [android debug file] https://github.com/kushp15/PY-to-APK

  • You need to post a [mre]. With no code we have no hope of figuring out what you're doing wroing. You also need to post the error message that goes with the crash. – Barmar Dec 09 '22 at 03:54
  • Please provide enough code so others can better understand or reproduce the problem. – Community Dec 09 '22 at 04:11
  • Try running `buildozer -v android debug deploy run logcat > my_log.txt` as described in the Buildozer documentation. – John Anderson Dec 09 '22 at 14:28
  • Thank you for your response, I have added my adb full logcat in the above GitHub link. Please check that out – kush patel Dec 09 '22 at 18:52

2 Answers2

0

There you have your errorerror

And the solution to it is providing mysql-connector-python in buildozer requirements. There has been a similar issue.

Marcin Orlowski
  • 72,056
  • 11
  • 123
  • 141
  • Thank you for your help and time, I tried working it still crashes my application. I tried another way and it worked, I have posted my answer Thank You. – kush patel Dec 21 '22 at 16:44
0

Instead of using mysql_connector_python, I switch to pymysql which worked correctly, and in buildozer instead of mysql_connector change to pymysql. Thats it, It works. I have updates on my github page. Link: https://github.com/kushp15/PY-to-APK