I am an extreme beginner with kivy and python-for-android. I've created a kivy tutorial app and have been trying to create the apk using p4a. I believe I've figured out the dependencies and command line requirements but I am currently stuck with a failure due to "_ctypes module not found" that according to the error messages occurs during an import attempt. The _ctypes module is installed and I am able to import it in IDLE without any problems. My OS is Linux Ubuntu 22.04.
The kivy tutorial app is the "Pong" app. It works perfectly on my PC and I don't think that is the issue, but can post its code if anyone suspects otherwise.
Using Python-for-Android, starting in my working directory, the p4a command I am entering is "p4a apk --private main.py --package=org.ach.pong --name "Pong" --version 0.1 --bootstrap=sdl2 --requirements=python3,kivy --arch arm64-v8a"
After the p4a compiling process runs for a few minutes, it always fails with the error "ModuleNotFoundError: No module named '_ctypes'"
But, as stated above, if I open IDLE and import _ctypes, it works perfectly, so I don't understand why the p4a compiler isn't finding it?