我从nativescript开始。我正在尝试构建一个hello world应用程序来对其进行测试。但是,当我运行它时,找不到命令的退出状态为127。
这是我尝试构建的方法:
[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]$
如果我运行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]$
我想念什么?
答案 0 :(得分:1)
我运行了tns install
以安装依赖项。那解决了我的问题。
答案 1 :(得分:0)
我尝试了几件事情,其中最适合我的是:
ns clean
ns install