微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Nativescript + Angular:运行“tns run android”时无法启动清理过程错误

如何解决Nativescript + Angular:运行“tns run android”时无法启动清理过程错误

我正在 macOS Big Sur 上用 Nativescript + Angular 构建一个项目。我无法运行或构建该项目的 android 版本。我不断收到此错误

Error while reporting exception: Error: Unable to start Cleanup process.

有人熟悉这个错误吗?我成功运行了 tns clean 以及 tns platform remove androidtns platform add androidtns prepare android,但是如果我运行 tns build androidtns run android,我会收到上述错误

这是我的 package.json。如果有任何有用的文件,请告诉我。

    {
  "name": "@nativescript/template-hello-world-ng","main": "main.js","version": "7.0.8","author": "NativeScript Team <oss@nativescript.org>","description": "NativeScript Application","license": "SEE LICENSE IN <your-license-filename>","publishConfig": {
    "access": "public"
  },"keywords": [
    "nativescript","mobile","angular","{N}","template"
  ],"repository": "<fill-your-repository-here>","bugs": {
    "url": "https://github.com/NativeScript/NativeScript/issues"
  },"dependencies": {
    "@angular/animations": "~11.0.0","@angular/common": "~11.0.0","@angular/compiler": "~11.0.0","@angular/core": "~11.0.0","@angular/forms": "~11.0.0","@angular/platform-browser": "~11.0.0","@angular/platform-browser-dynamic": "~11.0.0","@angular/router": "~11.0.0","@nativescript-community/ui-chart": "^1.1.29","@nativescript/angular": "~11.0.0","@nativescript/core": "^7.3.0","@nativescript/firebase": "^11.1.3","@nativescript/theme": "~3.0.0","nativescript": "^7.2.0","nativescript-carousel": "^7.0.1","nativescript-custom-bottomsheet": "^1.0.6","nativescript-fontawesome": "^1.0.0","nativescript-ngx-fonticon": "^7.0.0","nativescript-ui-chart": "^8.0.2","nativescript-ui-dataform": "^7.0.4","reflect-Metadata": "~0.1.12","rxjs": "^6.6.0","sass": "^1.32.7","zone.js": "~0.11.1"
  },"devDependencies": {
    "@angular/compiler-cli": "~11.0.0","@nativescript/android": "7.0.1","@nativescript/ios": "8.0.0","@nativescript/types": "~7.0.0","@nativescript/webpack": "~3.0.0","@ngtools/webpack": "~11.0.0","typescript": "^4.0.2"
  },"gitHead": "41a7254d3bc134fd3c258761f3c6e1c3d54e6d41","private": "true","readme": "NativeScript Application"
}

解决方法

终于得到一个有用的错误信息:

/Users/***/Documents/GitHub/RexChange_private/platforms/android/app/src/main/res/drawable-xhdpi/facebookLogo.png: Error: 'L' is not a valid file-based resource name character: File-based resource names must contain only lowercase a-z,0-9,or underscore

重命名我的图像资源解决了这个问题。我想这个错误是一个包罗万象。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。