运行`tns build android`时出现错误`spawn ./gradlew ENOENT`

Ahm*_*med 0 nativescript

我从 nativescript 开始。我正在尝试构建一个 hello world 应用程序来测试它。但是,当我运行它时,我得到一个退出状态 127 for command not found。

这是我尝试构建的方法:

[ahmed@localhost hello]$ tns build android
Executing before-shouldPrepare hook from /home/ahmed/PycharmProjects/hello/hooks/before-shouldPrepare/nativescript-dev-webpack.js
Skipping prepare.
Building project...
Gradle build...
spawn ./gradlew ENOENT
[ahmed@localhost hello]$ echo $?
127
[ahmed@localhost hello]$ 
Run Code Online (Sandbox Code Playgroud)

如果我跑tns doctor,一切似乎都好

[ahmed@localhost hello]$ tns doctor
? Getting environment information 

No issues were detected.
? Your ANDROID_HOME environment variable is set and points to correct directory.
? Your adb from the Android SDK is correctly installed.
? The Android SDK is installed.
? A compatible Android SDK for compilation is found.
? Javac is installed and is configured properly.
? The Java Development Kit (JDK) is installed and is configured properly.
? Local builds for iOS can be executed only on a macOS system. To build for iOS on a different operating system, you can use the NativeScript cloud infrastructure.
? Getting NativeScript components versions information...
? Component nativescript has 5.1.0 version and is up to date.
? Component tns-core-modules has 5.1.1 version and is up to date.
? Component tns-android has 5.1.0 version and is up to date.
? Component tns-ios has 5.1.0 version and is up to date.
[ahmed@localhost hello]$ 
Run Code Online (Sandbox Code Playgroud)

我错过了什么?

Ahm*_*med 11

我跑去tns install安装依赖项。那解决了我的问题。