Yes, the @DesignerComponent
annotation defaults its minSdk to whatever the App Inventor minSdk is.
of which there is not one in RUSH. Must get picked up somewhere else in the code
That sounds like a bad idea. I've toyed with using the various annotations from time to time in the Android code, so if they're not being added those extensions would break automatically.
I didn't ask, but given my extensions are set to min SDK 7, will this contribute to the issue seen regarding min SDK 21 being required ?
When App Inventor compiles an app, it takes the max over all of the used component's minSdk values and uses that as the minSdk for the app.
Why did i have a min sdk prob at gplay with no extensions?
This is a new feature of Google Play and has nothing to do with extensions. Specifically, Google now by default has a feature called "Automatic Protection" for apps, which if turned on injects new code into the AAB before it is converted into APKs to be distributed to users. The code Google injects requires the app be min SDK 21. It looks like if you turn it off you can upload AABs created by App Inventor without issue (like every app ever made up until Google introduced this new mechanism). Here are some screenshots I took of the process:
- Under "Test and release" go to App Integrity
- Locate "Automatic protection"
- Click Settings
- Turn off the "Installer check" option and then click save in the bottom right.
At this point you should be able to upload your AAB without getting the min SDK error.
Shouldn't Google then automatically request minSdk 21?
In theory, yes. However, given the complexity of the Android build system in general when you consider how tools like r8/proguard/etc. work and how they might optimize away various SDK checks in the code, bumping the min SDK after the fact could have unintended consequences so Google is likely just pushing the effort to the developer rather than having to worry about it themselves. Personally, I'd never want a company to inject code into an app and publish it under my name so I would turn this off at every opportunity as I cannot verify their code is correct.
All the more so since most of their code is not used, as they say, "good for the user", but to make money and secretly collect information about users. I prefer to watch non-personalized ads than to share information about myself.
Exactly, as always.
In rush you can set minSdk in xml file.
I could not see where, is this in the manifest.xml ? How would i do this ?
In rush.yml:
android:
minSdkVersion: 21
I should have RTFM...
The documentation says
in the rush.yml
name: ExtnName
description: Extension component for ExtnName. Created using Rush.
min_sdk: 21
version:
number: auto
name: '1.0'
In the component_build_infos.json
[{"assets":[],"activities":[],"permissions":[],
"type":"uk.co.metricrat.extnname.Extnname","androidMinSdk":[21]}]
Yes, I confused xml with yml