I have installed Delphi 10.4.2 CE version. All configurations is default by delphi installer.
My phone is OPPO and its Android version is Android 11.
New a FireMonkey project, connected my phone to my PC, and run it, everythiing is OK.
But if I upload this APP to Google play APP store, it says APP's API level is 29, it must be API level 30.
I run "C:\Users\Public\Documents\Embarcadero\Studio\21.0\CatalogRepository\AndroidSDK-2525-21.0.40680.4203\SDK Manager.exe“, it is installed by Delphi. And there are Android 10 (API 29), Android 9(API 28) ... etc. There are no API 30.
So, I run "C:\Users\Public\Documents\Embarcadero\Studio\21.0\CatalogRepository\AndroidSDK-2525-21.0.40680.4203\tools\bin\sdkmanager.bat" to download API 30 and its done.
And then re-start "SDK Manager.exe", I can see "Android 11(API 30)" in it.
And in this directroy "C:\Users\Public\Documents\Embarcadero\Studio\21.0\CatalogRepository\AndroidSDK-2525-21.0.40680.4203\platforms", there was added a directory named "android-30". So it seems I have API 30 in my system.
In Delphi IDE menu: Tools - Options - Deployment - SDK Manager, SDK API-level location option is set by Delphi, it is "C:\Users\Public\Documents\Embarcadero\Studio\21.0\CatalogRepository\AndroidSDK-2525-21.0.40680.4203\platforms\android-29", I changed it to "C:\Users\Public\Documents\Embarcadero\Studio\21.0\CatalogRepository\AndroidSDK-2525-21.0.40680.4203\platforms\android-30";
And then re-deploy this APP and upload to Google play, it still says my APP is on API 29.
I can not find any tips in IDE menu to change API level, so I check "AndroidManifest.xml" under "D:\MyProjectFile\Android64\Release", there is:
<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="29" />
I try to modify "D:\MyProjectFile\AndroidManifest.template.xml" from default:
<uses-sdk android:minSdkVersion="%minSdkVersion%" android:targetSdkVersion="%targetSdkVersion%" />
to:
<uses-sdk android:minSdkVersion="%minSdkVersion%" android:targetSdkVersion="30" />
to force it be API-30.
And re-build, deploy, and then upload to Google play, it works. No warning messages.
But, if I set project's "Configuration" to "Development" in IDE and press F9 to let it run in my phone, when it is installing in my phone, it is failed, and Delphi shows error message: adb: failed to install D:\MyProjectFile\Android64\Debug\testAndroid_11\bin\testAndroid_11.apk: Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]
And then I change "AndroidManifest.template.xml" to default, and re-build and deploy and press F9, it has installed in my phone success and worked fine. And then I check "AndroidManifest.xml", it is "<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="29" /> " again.
Repeat modify "AndroidManifest.template.xml" again and again, I'm sure if I set targetSDKVersion=29, it can install in my phone successed, if I changed it to targetSDKVersion=30, it install in my phone will be failed and the error message is: Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES].
If I change targetSDKVersion=29 to targetSDKVersion=30, and then set my project Configuration to "Application Store" build and deploy then I got my AAB file and can upload Google play successed, but I am not sure if it can installing success when a phone install it from Google play.
I have searched on internet, but no any message about this.