I've made a docker image specifically for packaging a kivy app into an APK, and optionally signing it. It's aimed specifically for the APK packaging bit, not the development bit, so it doesn't have android studio on it or anything.
What it does have is:
Ubuntu 16:04
Latest version (of Android SDK command line tools : 3.3.1
NDK version: r17c
Android build-tools: r28.0.3
python-for-android: 0.7.0
android platform 2.6
Most of the trouble I've experienced getting an APK built comes from the varying versions of apis etc which have changed over time. Docker is a nice way to get a point-in-time snapshot the whole stack. Well, the image is anyway. The Dockerfile used may well suffer from similar issues as time goes on.
It includes a single build run of a p4a distribution in order to minimize the downloading of external dependencies. Using the same distribution ("python2,android,kivy") for your app means you have a better chance of getting a working build.
However, anyone familiar with the internals of p4a will know that this also limits the choices of what can be build using this image.
Instructions in the description for the image. I would be very interested to hear if this is of use or anyone's thoughts on how this might be improved.
thanks
Ray