我已經安裝了NativeScript,並嘗試執行tns platform add android
,但它不起作用。 ANDROID_HOME路徑是正確的,我已經安裝了SDK(API 22和最新的)和工具(25.0.2)。當我運行tns doctor
它說:NativeScript在Mac OS上無法找到Android SDK
WARNING: The Android SDK is not installed or is not configured properly.
Cannot find a compatible Android SDK for compilation. To be able to build for Android, install Android SDK 22 or later.
You need to have the Android SDK Build-tools installed on your system. You can install any version in the following range: '>=25.0.2'.
You need to have Android SDK 22 or later and the latest Android Support Repository installed on your system.
檢測您的更改,請檢查https://github.com/NativeScript/nativescript-cli/issues/2583#issuecomment-285477270 - 您可以重新下載android Sdk並下載早期版本的平臺工具以臨時解決此問題。 – pkanev