项目目标不存在,IONIC CORDOVA BUILD ANDROID

r7knjye2  于 2022-12-16  发布在  Ionic
关注(0)|答案(1)|浏览(200)

我试图用cordova构建我的IONIC应用程序,但当我运行“ionic cordova build android”时,我得到这个错误:

An unhandled exception occurred: Project target does not exist.
[ERROR] An error occurred while running subprocess ng.

下面是完整的日志:

[error] Error: Project target does not exist.
    at findProjectTarget (C:\Users\jsaez\Documents\Odec\CTAV\ctav-mobile\node_modules\@angular-devkit\architect\node\node-modules-architect-host.js:49:15)
    at Object.getBuilderName (C:\Users\jsaez\Documents\Odec\CTAV\ctav-mobile\node_modules\@angular-devkit\architect\node\node-modules-architect-host.js:62:46)
    at WorkspaceNodeModulesArchitectHost.getBuilderNameForTarget (C:\Users\jsaez\Documents\Odec\CTAV\ctav-mobile\node_modules\@angular-devkit\architect\node\node-modules-architect-host.js:101:35)
    at RunCommand.runSingleTarget (C:\Users\jsaez\Documents\Odec\CTAV\ctav-mobile\node_modules\@angular\cli\models\architect-command.js:242:55)
    at RunCommand.runArchitectTarget (C:\Users\jsaez\Documents\Odec\CTAV\ctav-mobile\node_modules\@angular\cli\models\architect-command.js:295:35)
    at RunCommand.run (C:\Users\jsaez\Documents\Odec\CTAV\ctav-mobile\node_modules\@angular\cli\commands\run-impl.js:15:25)
    at RunCommand.validateAndRun (C:\Users\jsaez\Documents\Odec\CTAV\ctav-mobile\node_modules\@angular\cli\models\command.js:136:33)
    at async runCommand (C:\Users\jsaez\Documents\Odec\CTAV\ctav-mobile\node_modules\@angular\cli\models\command-runner.js:224:24)
    at async default_1 (C:\Users\jsaez\Documents\Odec\CTAV\ctav-mobile\node_modules\@angular\cli\lib\cli\index.js:70:31)

这是我的包裹

{

  "dependencies": {
   
    "@ionic/angular": "^6.0.0",
    "@ionic/cordova-builders": "^7.0.0",
    "@ionic/storage": "^3.0.6",
    "@ionic/storage-angular": "^3.0.6",
    "ionic-cache": "^6.0.3",
  },
  "cordova": {
    "plugins": {
      "cordova-plugin-statusbar": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {},
      "cordova-plugin-ionic-keyboard": {}
    },
    "platforms": [
      "android",
    ]
  }
}
f8rj6qna

f8rj6qna1#

你试过this吗?

ng add @ionic/cordova-builders

npm install -g @ionic/cli@latest

相关问题