Github user filmaj commented on the issue:
https://github.com/apache/cordova-android/pull/369
@dpogue thanks for checking! So I think `android_sdk_version` failing in
this case is kind of expected, as that script, historically, did not do any
environment checking, and I tried keeping the same behaviour.
The other commands that are part of `Api.js`, like `build` and `clean` and
`run`, [always call through to
`check_reqs`](https://github.com/apache/cordova-android/blob/master/bin/templates/cordova/Api.js#L344-L346).
Part of that functionality in this pull request now [automatically adds the
new SDK tools to your
`PATH`](https://github.com/filmaj/cordova-android/blob/CB-12546/bin/templates/cordova/lib/check_reqs.js#L295-L297)
if they are missing. That's why the `build` command worked for you, but the
`android_sdk_version` command did not.
We could tweak the behaviour of `android_sdk_version` so that it calls
through to `check_reqs` as well? This change would fix that command failing in
your case, and provide more meaningful errors for people who don't have their
environments configured properly (i.e. will check for missing `ANDROID_HOME`,
will munge `PATH` based on what kinds of Android tooling it will find, etc.).
What do you think?
The deeper question that rises out of this is: is `android_sdk_version`
useful? Is it worth keeping around? It is not part of the platform API and is
still hanging around due to history more than anything else.
Let me know what y'all think.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]