重新彻底 build 然后重新 deploy 出来的 aab 文件,放到 google play 里面去,仍然还是提示:
Your app currently targets API level 29 and must target at least API level 30 to ensure it is built on the latest APIs optimized for security and performance. Change your app's target API level to at least 30. Learn More
----------------------------------------------
-
1) any Android SDK is not REALLY installed (like a any other software MSWindows)
2) you can "JUST COPY" any Android SDK directory from any other computer for your computer (it is not really installed, just copyed)
3) all installation done under GetIt is: a) downloaded from Embarcadero or third-part like a zip or exe b) this file will be saved on ..\Public\...Embarcadero...CatalogueRepository, then, you can try re-run it again if any fail on GetIt install (of course, if GetIt dont delete it)
4) Android Studio is really not necessary for update Android SDK on RAD Studio, but it help in download last updates a) you can use tool SDKManager.exe/bat on SDK Android MSWindows installed by RAD Studio (if it exist, of course) b) In last editions, RAD Studio is forcing GetIT use, then, just only some files from SDK Android is installed by default, the TOOLS needs to be donwloaded and updated for last updates, as necessary. c) RAD Studio show that SDK Android you need have for each RAD Studio edition, then, any other can dont works as expected.
5) if you downloaded Android Studio for update your Android SDK to RAD Studio, you can: a) in Android Studio, update all SDK Android that you need. each one for a folder for easy indentification .... skd29 .... sdk30 etc...
the name or drive/directory is not very important. you can use any one
my advice: -- try dont use "c:\program files or (x86)" (always needs privilegies "ADMIN") as target to install your softwares ----- use any other target, like C:\MySDKsAndroid <-- dont needs any privilegies of "Admin"
b) you can copy this folders (SDK's) for you driver and root desired, like me: d:\MySDKsAndroid\ ....SDK1 ....SDK2 etc...
c) if you choice install all components from SDK Android, then, you can: 1) copy each folder SDK for you drive/directory desired 2) uninstall Android Studio from your computer 3) delete any residual of Android Studio of your computer
d) now, you can just say to RAD Studio where is the SDK Android that it can use.
e) as each SDK Android was updated to "full" files, then, each SDK will have "tools" necessary for next updates... or be, you will have the "SDKManager" for run and update it again if necessary.
you see?
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
1. I have installed Delphi 10.4.2 CE on my computer.
2. Delphi IDE menu: tools / options / deployment / sdk manager / android, there is a option that is "API Level". Its value is: C:\Users\Public\Documents\Embarcadero\Studio\21.0\CatalogRepository\AndroidSDK-2525-21.0.40680.4203\platforms\android-29
So, according to this path, I guess it is installed by Delphi. And Delphi can compile Android App. So this path is the right path about Android SDK.
3. Under the same path, C:\Users\Public\Documents\Embarcadero\Studio\21.0\CatalogRepository\AndroidSDK-2525-21.0.40680.4203\ There is a GUI program named: "SDK Manager.exe", run it, I can see there is a list that include some package:
4. In the same path: C:\Users\Public\Documents\Embarcadero\Studio\21.0\CatalogRepository\AndroidSDK-2525-21.0.40680.4203\tools\bin
there is a file named "sdkmanager.bat", I run it by some parameters like: sdkmanager.bat --"platform-tools" "platforms;android-30", its works fine. And then, I got this: C:\Users\Public\Documents\Embarcadero\Studio\21.0\CatalogRepository\AndroidSDK-2525-21.0.40680.4203\platforms\android-30
Beofre, my compunter just exists this: C:\Users\Public\Documents\Embarcadero\Studio\21.0\CatalogRepository\AndroidSDK-2525-21.0.40680.4203\platforms\android-29
5. run GUI programe "SDK Manager.exe" again, and I can see: Android 11(API 30) in there.So, it seems works.
6. Go to Delphi IDE menu tools / options / ... / SDK Manager, I changed the API Level location option let it to the new Android-30 directory: C:\Users\Public\Documents\Embarcadero\Studio\21.0\CatalogRepository\AndroidSDK-2525-21.0.40680.4203\platforms\android-30
7. Re-build APP and deploy it, Delphi create a new AAB file.
8. upload this file to google play, it says this file is compile on API 29.
So, the fact is: 1. Android SDK is there, otherwise delphi can not create AAB file; 2. through run "sdkManager.bat",install Android 11(API 30) has successed. No error message. and can check it in GUI tool "SDK Manager.exe". 3. In Delphi IDE set the "SDK API-level location " to new directory OK.
Are there any other things I missed ?
Or it is not just about API-level and there are some other Android package needed?
----------------------------------------------
-
if modify AndroidManifest.template.xml, set its "android:targetSdkVersion="30"", then build success, and deploy fail.
----------------------------------------------
-
in your system: sdkmanager.bat --list_installed --sdk_root=d:\MySDKroot_dir
for updates: sdkmanager.bat --list --sdk_root=d:\MySDKroot_dir
ex.:
sdkmanager.bat --sdk_root=d:\MySDKroot_dir "build-tools;31.0.0" "cmdline-tools;latest" "ndk;23.1.7779620" "patcher;v4" "platform-tools" "platforms;android-31" "skiaparser;2" "sources;android-31" "system-images;android-31;default;arm64-v8a"
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
Basically, just modify AndroidManifest.template.xml, set android:targetSdkVersion="%targetSdkVersion%" to android:targetSdkVersion="30", it works.
I have got some error message, because the AndroidManifest.template.xml I modified, I have added some remarks just like "<!-- -->", but it is error format.
----------------------------------------------
-
there are two config: 1. IDE menu: Tools / options / deployment / sdk manager/ android 64 bit. Change API-level path to "Android-30" folder;
2. Under project folder, modify AndroidManifest.template.xml, update this: android:targetSdkVersion="%targetSdkVersion%" to android:targetSdkVersion="30", force it use API-30 but 29.
And we can get it.
----------------------------------------------
-