To comply with Google Play Store, we have to use minSdkVersion
This causes older phones not to be able to run apps.
Recently I had to put this value in build.settings file, and rebuilt the apk, and uploaded it to google play store
I did not change anything in the code, only this line, and some users are unable to download the app.
I can eventually send users the apk file using a download link, but should I remove this line from the build? or should I keep it?
Does it really make a difference in the build itself (compilation), or is it something only controlled by google play store by matching SDK level and phone type
The Android system prevents the user from installing the application if the system’s API level is lower than the value specified in this attribute.
If you don’t declare this attribute, the system assumes a default value of “1”, which indicates that your application is compatible with all versions of Android. If it isn’t, and you didn’t declare the proper minSdkVersion, then when installed on a system with an incompatible API level, the application crashes during runtime when attempting to access the unavailable APIs.
From what I understand, they suggest declaring a minimum version. Otherwise, this might affect your users and you, in the end.
If you want to keep user devices playable below the minimum version required by GP, then you need to create two APKs:
For GP, make sure minSdkVersion meet the requirements;
For user (devices) whose versions are below GP’s minSdkVersion requirement, remove the minSdkVersion declaration, so they can continue to install the apk you sent (but they can’t search for your game on GP).
minSdkVersion is controlled by you to limit old devices.
targetSdkVersion is something that needs to be updated once a year by those who maintain the official version of Solar2D… Specifically:
API 33 is supported in the latest Solar2D version, so you now can just build your game with it.
Don’t try to set the value in build settings or whatever. Just build your game using last Solar2D version.
Solar2D builder will set the proper value of targetSdkVersion for you.
Things just got mixed up a little bit for me, because sometimes you just copy and paste a line from the internet without caring about what it does just to solve your problem quickly and move on.
Sometimes build crashes if you don’t put minSDK, and google warnings make things worse, and when mixed together you face problems just like what happened to me
the standard format for upload is now AAB, so just ignore the apk, unless you have a reason to upload it.
The error is pointing out that you didn’t update the version code when you built (11), but maybe it’s just that the apk and the aab have the same number. If it is so then I guess they need to be built separately, with a different code for each.
…still I wouldn’t upload an apk if there’s no reason to do so.