I built a new Java Android app on a new PC using a fresh install of Android Studio 4.1.2, and was able to run it on my phone from the debugger fine. However, when I built a signed APK file (using my normal key store file) and copied it to my phone, I could not install it on the phone using the Google Files app, like I usually can. After several hours, I eventually worked out that if I changed my build.gradle file so that the compileSdkVersion, buildToolsVersion, and targetSdkVersion were all 29 instead of 30, then the APK installed fine. This is even though my phone is running Android 11 and the minSdkVersion in my build.gradle is 19 (Android 4.1).
The app is fairly simple, consisting of two java files: a main activity and a server class which extends the open-source NanoHTTPD class. The NanoHTTPD jar file is in the app's libs folder. The app only requires the following permissions in it's manifest: android.permission.INTERNET, android.permission.ACCESS_WIFI_STATE, android.permission.ACCESS_NETWORK_STATE
How do I find out if this is something I'm doing wrong, a bug with version 30 of Google's SDK, or a bug in Android Studio so I can report it to the appropriate people? Thanks.