Search code examples
pythonapkopencv

How can i convert py file to an apk file?


Please answer this fast. I want to convert an .py file to .apk file so i can run it on Android. It is just one simple program that uses cv2 module to detect faces and make alerts with no ui (user interface) and gui/window.I don't have a problem with code, but i have problem with converting.

I tried with Buildozer, but i have some errors with downloading. It says that buildozer-remote.exe and buildozer.exe files are not in system PATH, so it doesnt work. I opened environment variables and made new one with that path, but it is the same as on start. Also, i am using Windows so it doesn't work. Kivy dont fit to me. Recommend me other program?


Solution

  • You can use Windows subsystem for Linux and build Android Debug Bridge with your Android device. Did you add cv2 module to buildozer requirements line? Did you try to change the domain in buildozer from org.test to com.yourappname ?

    These videos helped me a lot and has much more data https://www.youtube.com/watch?v=VsTaM057rdc

    https://youtu.be/tWUkPflqA64?si=vjrzIG9iCgE9lqcY

    p.s. My english is not good, but I tried my best