Comments (17)
So, since --api
defines the target SDK version, and there is already --min-sdk-version
, and also Android documentation have the same name, for me, it's clear that we should have 2 flags: --min-sdk-version
and --target-sdk-version
(instead of --min-sdk-version
and --api
).
--list-apis
lists installed APIs (SDKs?) on specific PC, and as far as I understand, it can stay the same.
It's a breaking change, but since we have CI checks this change should be handled with a low effort. I can submit a PR with this change and we will see.
If you don't want to change the naming - it's ok, I just thought that was a good improvement.
from vab.
We can't do much about the confusion Android has poured upon itself in this regard. I think --min-sdk-version
is what you're looking for?
from vab.
Can't we specify minimum API? I plan to make a PR
from vab.
Doesn't the SDK version match the API version? If so, then --min-sdk-version
does specify the minimum API.
from vab.
I should research a bit since I don't know
from vab.
https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels appears to say that I am correct... SDK version == API version.
from vab.
--min-sdk-version
is what you are after. See https://developer.android.com/guide/topics/manifest/uses-sdk-element the flag is named after minSdkVersion
. As I mentioned above, Android has done an extremely bad job at keeping things simple in this regard.
from vab.
--min-sdk-version
is what you are after. See https://developer.android.com/guide/topics/manifest/uses-sdk-element the flag is named afterminSdkVersion
. As I mentioned above, Android has done an extremely bad job at keeping things simple in this regard.
Ok, so maybe we should rename --api
flag then to --target-sdk-version
?
from vab.
Also note that vab
cannot go lower than level 21 for reasons I cannot sum up easily here. One includes the shift they made from gcc
many years ago in the NDK. If you want to target anything lower than 21- I'll just wish you luck.
from vab.
I actually want the opposite - set the minimum target to 26
from vab.
--min-sdk-version
is what you are after. See https://developer.android.com/guide/topics/manifest/uses-sdk-element the flag is named afterminSdkVersion
. As I mentioned above, Android has done an extremely bad job at keeping things simple in this regard.Ok, so maybe we should rename
--api
flag then to--target-sdk-version
?
Why? --api
tells vab what API level to use?
IMO it's a breaking change that has little benefit to the mess Android has introduced to the environment already. In my opinion nobody can fix the API naming mess they've made no matter how we name our flags. On top --api
is already documented. Also note that --list-apis
will become the next inconsistency in this case, what should that flag be named? It's an irreversible mess that Google has made, that we should stay away from trying to fix IMO.
from vab.
I actually want the opposite - set the minimum target to 26
Then just use --min-sdk-version
.
@ArtemkaKun sorry for editing your answer, GitHub on mobile web is not cool
from vab.
--api
does not define the targetSdkVersion
it defines the NDK API level compiler to use. vab
then does it's best to make sure the SDK matches. Again; as I said: it's a mess and something that trips many Android developers. Remember: vab
is based on the NDK, the SDK is only really needed for the packaging and Java interop and that the SDK != NDK.
Please make sure you understand how the API levels between the SDK and NDK is only related and how they in some cases aren't compatible before making any PRs:
Note that the definition of target API level in the NDK differs from the SDK. For the NDK, the target API level is the minimum supported API level for the app. If any non-ABI features are guarded by the target API level, they will only be available to apps with a minimum target that includes that API level.
This is one reason that it's called --api
since it really doesn't have much to do with the targetSdkVersion
when you're using the NDK.
from vab.
from vab.
Ok, seems things are more complicated than I thought 😅 Let's just leave --api
alone for now
from vab.
If you don't want to change the naming - it's ok, I just thought that was a good improvement.
I'm always open to improvements, it's just that --api
is not the targetSdkVersion, it's the API level compiler to use - and that's not 100% the same thing.
from vab.
Welcome to Android development in 2023+ 😅
from vab.
Related Issues (20)
- Overwriting Application object or not? HOT 2
- stdout , stderr redirection and related issues HOT 10
- Need a way to ask for permissions HOT 4
- Modularization support of native libs to get AAB suitable for "instant apps" HOT 2
- NDK version HOT 6
- Unable to build the 2048 example. Getting '/tmp/vab/package/apk/res' does not exist HOT 17
- build failure with V 0.2.4 abf3527 HOT 1
- failed to compile .c to .o HOT 1
- An example works weirdly. HOT 7
- VAB cannot detect installed api. HOT 13
- VAB does not detect `adb` HOT 3
- Finding sdkmanager error
- What is wrong? HOT 2
- add flag to print commands HOT 1
- `vab` doesn't support traget API > 31 HOT 4
- Failed to remove: No such file or directory HOT 2
- Can't find keytool HOT 11
- Feature Request: Answer this in the docs: What works and what doesn't? HOT 2
- seems missing mbedtls android lib? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vab.