feat: more informative android compile SDK messages #5697
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Checklist
What is the current behavior?
CLI produces an incorrect error message that does not indicate that the reason for being unable to find a compatible android SDK version has anything to do with the range of android SDK versions which are interoperable with your current android runtime version. This will leave the user confused if they have a newer android SDK version installed than the most recent one (especially when the CLI is currently telling them to install "version x or later") which is compatible with their current android runtime version e.g. @nativescript/android version 8.1.1 + Android SDK version 31.
What is the new behavior?
The error message produced when unable to find an Android SDK version compatible with your android runtime version will list out the android SDK versions compatible with your runtime version, and specifically mention
Supported targets vary based on what android runtime you have installed. Currently your app uses @nativescript/android x.x.x