我对 nativescript 很陌生,我尝试在 nativescript 中构建我的第一个应用程序,但它显示
==================================================== ============================
C:\Nativescript\Grab1>
C:\Nativescript\Grab1>tns 准备安卓
从 C:\Nativescript\Grab1\hooks\before-prepare\na 执行 before-prepare Hook
tivescript-dev-android-snapshot.js
准备项目...
SLF4J:无法加载类“org.slf4j.impl.StaticLoggerBinder”。
SLF4J:见 http://www.slf4j.org/codes.html#StaticLoggerBinder了解更多详情
s。
FAILURE:构建失败并出现异常。
org/slf4j/impl/StaticLoggerBinder
使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 运行
获得更多日志输出的选项。
处理 node_modules 失败。错误:命令 C:\Nativescript\Grab1\platforms\a
android\gradlew.bat 失败,退出代码为 1
C:\Nativescript\Grab1>
==================================================== ===============================
在这里我也附上了我的命令提示屏幕截图,请 friend 们帮我解决这个问题
最佳答案
platform -> android
中似乎缺少一些文件文件夹。我通过删除 android 平台并使用以下命令再次添加它来解决此问题:
确保您在项目目录中。然后尝试以下两个命令:
tns platform remove android
tns platform add android
IOS 也一样:tns platform remove ios
tns platform add ios
关于nativescript - gradlew.bat 失败,退出代码为 1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42432811/