因此,过去几个月我一直在使用 Angular-Nativescript,并且有一个项目都使用 Angular 9。短暂休息后,我开始在另一台机器上工作,该机器说项目正在开发,但不记得它是在 Angular 7 上. 我运行脚本来升级 Angular,它直接升级到版本 10,这是我的问题开始的地方。在所有安装、升级、迁移、下载和重新安装之后,我能够生成、运行和提供 Angular 组件,但我无法构建 Nativescript。tns build android 命令总是运行到 55% 然后抛出错误
命令 gradlew.bat 失败,退出代码为 1
我不知道在哪里可以找到更详细的信息。我尝试在批处理文件中回显不同的步骤,但不知道是什么问题。如果我没有使用正确的术语,我深表歉意,因为我对前端世界还很陌生。
一些支持信息......我已经到了在我的机器上使用模拟器的地步。我安装了运行模拟器的 Android Studio。因此,当我运行 tns 设备时,我可以看到一个示例,如随附的屏幕截图所示。据我所知,应该创建一个 apk 文件并将其传输到模拟器,但我不知道在哪里查看文件是否正在创建但只是没有被传输。
如果有人知道这是什么,我们将不胜感激获得正确的修复错误。
控制台文本是
tns build android
Preparing project...
Hash: b88f22b61097dd6429ce
Version: webpack 4.44.0
Time: 72ms
Built at: 07/27/2020 18:00:16
Asset Size Chunks Chunk Names
main.js 958 bytes 0 [emitted] main
Entrypoint main = main.js
[0] ./src/index.js 386 bytes {0} [built]
WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enable defaults for each environment.
You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/configuration/mode/
Project successfully prepared (android)
Building project...
Gradle build...
+ setting applicationId
+ applying user-defined configuration from C:\Repos\Sothecom\ManageTurns\src\Sothecom.ManageTurns.MobileWeb\baseline\App_Resources\Android\app.gradle
+ using android X library androidx.legacy:legacy-support-v4:1.0.0
+ adding nativescript runtime package dependency: nativescript-optimized-with-inspector
+ adding aar plugin dependency: C:\Repos\Sothecom\ManageTurns\src\Sothecom.ManageTurns.MobileWeb\baseline\node_modules\tns-core-modules-widgets\platforms\android\widgets-release.aar
Command gradlew.bat failed with exit code 1
tns 信息是
tns info
√ Getting NativeScript components versions information...
√ Component nativescript has 6.7.8 version and is up to date.
√ Component tns-core-modules has 6.5.12 version and is up to date.
√ Component tns-android has 6.5.3 version and is up to date.
‼ Update available for component tns-ios. Your current version is 6.3.0 and the latest available version is 6.5.2.