我怎样才能 运行 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
失败:构建失败,出现异常。
出了什么问题:
任务“:app:clean”执行失败。
Unable to delete directory: C:\Ideas\Source\b2bAngular\platforms\android\app\build\intermediates\assets\debug\app\app\cars\model
尝试:
运行 使用 --stacktrace 选项获取堆栈跟踪。 运行 使用 --info 或 --debug 选项以获得更多日志输出。 运行 使用 --scan 以获得完整的见解。
获取更多帮助
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脚本,成功了。
所以我开始了一个执行该脚本的新项目,但它没有工作,但是当我创建一个新项目而不执行它时,一切都运行良好。
我认为该脚本有问题
当我按照步骤使用 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
失败:构建失败,出现异常。
出了什么问题: 任务“:app:clean”执行失败。
Unable to delete directory: C:\Ideas\Source\b2bAngular\platforms\android\app\build\intermediates\assets\debug\app\app\cars\model
尝试: 运行 使用 --stacktrace 选项获取堆栈跟踪。 运行 使用 --info 或 --debug 选项以获得更多日志输出。 运行 使用 --scan 以获得完整的见解。
- 获取更多帮助
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脚本,成功了。
所以我开始了一个执行该脚本的新项目,但它没有工作,但是当我创建一个新项目而不执行它时,一切都运行良好。
我认为该脚本有问题