我怎样才能 运行 android 捆绑为 Nativescript

How can I run android in bundle for Nativescript

当我按照步骤使用 angular 将 Web 项目迁移到代码共享时,在执行 tns 运行 android --bundle 之后,出现以下错误:

ERROR in Could not resolve module C:\Ideas\Source\b2bAngular\src\app.module

Webpack 编译完成。监视文件更改。 Webpack 构建完成! 从 C:\Ideas\Source\b2bAngular\hooks\before-shouldPrepare\nativescript-dev-webpack.js 执行 before-shouldPrepare 钩子 从 C:\Ideas\Source\b2bAngular\hooks\before-cleanApp\nativescript-dev-webpack.js 执行 before-cleanApp 钩子 准备项目... 从 C:\Ideas\Source\b2bAngular\hooks\before-prepareJSApp\nativescript-dev-webpack.js 执行 before-prepareJSApp 钩子 Gradle干净... + 设置applicationId + 应用来自 C:\Ideas\Source\b2bAngular\App_Resources\Android\app.gradle 的用户定义配置 + 添加 nativescript 运行time 包依赖:nativescript-optimized-with-inspector + 添加 aar 插件依赖:C:\Ideas\Source\b2bAngular\node_modules\tns-core-modules-widgets\platforms\android\widgets-release.aar

失败:构建失败,出现异常。

4 秒内构建失败 无法在设备上应用更改:c1f7d849。错误是:命令 gradlew.bat 失败,退出代码为 1。 从 C:\Ideas\Source\b2bAngular\hooks\after-watch\nativescript-dev-webpack.js 执行 after-watch hook 停止 webpack 监视 从 C:\Ideas\Source\b2bAngular\hooks\after-watch\nativescript-dev-webpack.js

执行 after-watch hook

非常感谢任何帮助!!

我再次启动进程时成功了,但是这次我没有执行update-ns-webpack脚本,成功了。

所以我开始了一个执行该脚本的新项目,但它没有工作,但是当我创建一个新项目而不执行它时,一切都运行良好。

我认为该脚本有问题