Description
Environment
Provide version numbers for the following components (information can be retrieved by running tns info
in your project folder or by inspecting the package.json
of the project):
- CLI: 8.1.3
- Cross-platform modules:
- Android Runtime:
- iOS Runtime:
- XCode Version:
- Plugin(s):
Describe the bug
Android SDK version 31 is installed as default recommended settings for Android Studio. I seem that ns command could not recognize version 31 yet. And the message is bit misleading.
To Reproduce
- Follow the Environment setup guide: https://docs.nativescript.org/environment-setup.html#macos-android
- Install Android Studio with default recommended settings with Android SDK version 31 and Build-Tools version 31 installed.
- Run
ns doctor
Warning will be thrown:
✖ Cannot find a compatible Android SDK for compilation. To be able to build for Android, install Android SDK 28 or later.
Run `$ sdkmanager` to manage your Android SDK versions.
✖ You need to have the Android SDK Build-tools installed on your system. You can install any version in the following range: '>=23 <=30'.
Run `$ sdkmanager` from your command-line to install required `Android Build Tools`. In case you already have them installed, make sure `ANDROID_HOME` environment variable is set correctly.
Expected behavior
ns doctor should report that:
✔ Your adb from the Android SDK is correctly installed.
✔ The Android SDK is installed.
✔ A compatible Android SDK for compilation is found.
Sample project
No need to setup a project
Additional context
Although, I could not found any official information about supported SDK version on website. I think message "install Android SDK 28 or later." which ns doctor reported, was bit misleading. Either fix the message and clearly state that SDK 31 is not supported, or we should add support for Android SDK 31 soon?