2016-10-25 116 views
4

我只是想安裝NavtiveScript,爲了這個,我跟着在NativeScript安裝問題

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'))" 

一切似乎安裝沒有任何問題。但是,當我試圖通過命令來驗證安裝,「TNS醫生」我下面的警告回報:

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. 

任何人都可以請指導?

我正在使用Windows 10,並在我的機器上安裝了Visual Studio 2015(更新3)和Visual Studio代碼。

+0

爲此。我在安裝巧克力時遇到錯誤,所以腳本無法繼續安裝jdk和android sdk。仍然沒有答案 –

回答

0

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

從上面的鏈接安裝Android工作室,然後之後運行工作室,從演播室內安裝所需的Android SDK中的包。

+0

我試過這個,但它不起作用。運行tns醫生仍然會返回錯誤。 –

+0

您必須設置PATH變量才能指向SDK。 –

0

安裝Android的命令行也沒有爲我工作,給我與你一樣的錯誤。我通過下載和安裝Android Studio瞭解了這一點。安裝完成後,你應該能夠找到android sdk的位置,這是/ Users/myMacUserName/Library/Android/sdk在我的情況下。你可以通過SDK Manager選擇所有需要的東西。在終端中,您可以從NativeScript installtion指令'export ANDROID_HOME =/usr/local/opt/android-sdk'執行'export ANDROID_HOME =/Users/myMacUserName/Library/Android/sdk'。完成這些之後,您應該可以安心使用Android SDK錯誤。