NativeScript安装问题

Nav*_*med 8 nativescript angular2-nativescript

我只是想安装NavtiveScript,为此,我按照官方安装指南进行操作

http://docs.nativescript.org/angular/start/quick-setup but I am stuck at "Step 3: Install iOS and Android requirements"

当我在命令提示符中运行以下命令时(具有管理权限)

@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://www.nativescript.org/setup/win'))"
Run Code Online (Sandbox Code Playgroud)

一切似乎安装没有任何问题.但是当我尝试通过命令验证安装时,"tns doctor"我返回以下警告:

 D:\>tns doctor
WARNING: adb from the Android SDK is not installed or is not configured properly.
For Android-related operations, the NativeScript CLI will use a built-in version of adb.
To avoid possible issues with the native Android emulator, Genymotion or connected
Android devices, verify that you have installed the latest Android SDK and
its dependencies as described in http://developer.android.com/sdk/index.html#Requirements

TIP: To avoid setting up the necessary environment variables, you can use the chocolatey package manager to install the Android SDK and its dependencies.

WARNING: The Android SDK is not installed or is not configured properly.
You will not be able to build your projects for Android and run them in the native emulator.
To be able to build for Android and run apps in the native emulator, verify that you have
installed the latest Android SDK and its dependencies as described in http://developer.android.com/sdk/index.html#Requirements

TIP: To avoid setting up the necessary environment variables, you can use the chocolatey package manager to install the Android SDK and its dependencies.

NOTE: You can develop for iOS only on Mac OS X systems.
To be able to work with iOS devices and projects, you need Mac OS X Mavericks or later.

Cannot find a compatible Android SDK for compilation. To be able to build for Android, install Android SDK 22 or later.
Run $ android 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 <=24'.
Run android from your command-line to install required Android Build Tools.

You need to have Android SDK 22 or later and the latest Android Support Repository installed on your system.
Run $ android  to manage the Android Support Repository.
Run Code Online (Sandbox Code Playgroud)

有人可以指导吗?

我正在使用Windows 10,并在我的机器上安装了Visual Studio 2015(更新3)和Visual Studio代码.

小智 7

安装Android的命令行对我也不起作用,并给了我与您相同的错误。我通过下载并安装Android Studio来弄清这一点。安装后,您应该可以找到android sdk的位置,在我的情况下为/ Users / myMacUserName / Library / Android / sdk。您可以通过SDK Manager选择所有需要的东西。然后,在终端中,执行“ export ANDROID_HOME = / Users / myMacUserName / Library / Android / sdk”,而不是NativeScript安装指令“ export ANDROID_HOME = / usr / local / opt / android-sdk”中的命令。完成所有这些操作后,您应该可以解决Android SDK错误。


Mag*_*win 0

https://developer.android.com/studio/index.html

从上面的链接安装 android studio,然后运行 ​​studio 并从 studio 内安装所需的 android sdk 软件包。