首页 > 解决方案 > Ionic run android - 评估 CordovaLib 时出错

问题描述

我正在尝试使用命令在我的 Android 设备上运行 ionic

ionic cordova run android --device

不幸的是,我收到了一个我不知道如何解决的构建错误。试图卸载/安装cordova和ionic,但没有帮助

“出了什么问题:评估项目 CordovaLib 时出现问题。”

当我遇到与我的 Windows 用户配置文件相关的问题时,问题就开始了。我将所有用户文件复制到其他目录,设置新用户并从备份中复制回所有文件。看起来不是一个聪明的举动

请帮忙! 在此处输入图像描述 谢谢

这是 Package.json 和 ionic 信息:

{
  "name": "TowerJazzApp",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "lint": "ionic-app-scripts lint",
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  },
  "dependencies": {
    "@angular/common": "5.0.3",
    "@angular/compiler": "5.0.3",
    "@angular/compiler-cli": "5.0.3",
    "@angular/core": "5.0.3",
    "@angular/forms": "5.0.3",
    "@angular/http": "5.0.3",
    "@angular/platform-browser": "5.0.3",
    "@angular/platform-browser-dynamic": "5.0.3",
    "@ionic-native/app-version": "^4.5.3",
    "@ionic-native/core": "4.4.0",
    "@ionic-native/in-app-browser": "^4.6.0",
    "@ionic-native/launch-navigator": "^4.5.3",
    "@ionic-native/splash-screen": "4.4.0",
    "@ionic-native/status-bar": "4.4.0",
    "@ionic/storage": "2.1.3",
    "angular2-logger": "^0.7.0",
    "cordova-android": "7.0.0",
    "cordova-plugin-actionsheet": "^2.3.3",
    "cordova-plugin-app-version": "^0.1.9",
    "cordova-plugin-device": "^2.0.1",
    "cordova-plugin-dialogs": "^2.0.1",
    "cordova-plugin-inappbrowser": "^2.0.2",
    "cordova-plugin-ionic-keyboard": "^2.0.5",
    "cordova-plugin-ionic-webview": "^1.1.16",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-whitelist": "^1.3.3",
    "ionic-angular": "3.9.2",
    "ionicons": "3.0.0",
    "rxjs": "5.5.2",
    "sw-toolbox": "3.6.0",
    "uk.co.workingedge.phonegap.plugin.launchnavigator": "^4.1.5",
    "zone.js": "0.8.18"
  },
  "devDependencies": {
    "@ionic/app-scripts": "3.1.8",
    "typescript": "2.4.2"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-app-version": {},
      "uk.co.workingedge.phonegap.plugin.launchnavigator": {},
      "cordova-plugin-whitelist": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {},
      "cordova-plugin-ionic-keyboard": {},
      "cordova-plugin-inappbrowser": {}
    },
    "platforms": [
      "android"
    ]
  }
}

在此处输入图像描述

标签: androidcordovaionic-frameworkgradleionic3

解决方案


只需CordovaLib从中删除文件夹platform/android

并重新运行您的应用程序


推荐阅读