cordova平台添加android有以下错误

时间:2017-06-13 08:46:56

标签: android ionic3

**我的package.json **

{
  "name": "ionic-app-base",
  "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": "2.4.8",
    "@angular/compiler": "2.4.8",
    "@angular/compiler-cli": "2.4.8",
    "@angular/core": "2.4.8",
    "@angular/forms": "2.4.8",
    "@angular/http": "2.4.8",
    "@angular/platform-browser": "2.4.8",
    "@angular/platform-browser-dynamic": "2.4.8",
    "@angular/platform-server": "2.4.8",
    "@ionic-native/action-sheet": "^3.4.4",
    "@ionic-native/app-version": "^3.1.0",
    "@ionic-native/app-update": "^3.9.2",
    "@ionic-native/barcode-scanner": "^3.4.4",
    "@ionic-native/camera": "^3.4.4",
    "@ionic-native/camera-preview": "^3.5.0",
    "@ionic-native/core": "^3.7.0",
    "@ionic-native/date-picker": "^3.4.4",
    "@ionic-native/file": "^3.4.4",
    "@ionic-native/file-opener": "^3.8.0",
    "@ionic-native/image-picker": "^3.4.4",
    "@ionic-native/keyboard": "^3.4.4",
    "@ionic-native/social-sharing": "^3.4.4",
    "@ionic-native/transfer": "^3.4.4",
    "@ionic/storage": "2.0.0",
    "action-sheet": "^1.0.5",
    "chart.js": "^2.5.0",
    "intl": "^1.2.5",
    "ion2-calendar": "^1.0.6",
    "ionic-angular": "2.2.0",
    "ionic-image-loader": "^3.2.0",
    "ionic-native": "2.4.1",
    "ionic2-city-picker": "^0.0.4",
    "ionicons": "3.0.0",
    "jsqr": "^0.2.2",
    "lodash": "^4.17.4",
    "moment": "^2.18.1",
    "pouchdb": "^6.1.2",
    "pouchdb-adapter-cordova-sqlite": "^2.0.2",
    "rxjs": "5.0.1",
    "setimmediate": "^1.0.5",
    "sw-toolbox": "3.4.0",
    "uuid": "^3.0.1",
    "zone.js": "0.7.2"
  },
  "devDependencies": {
    "@ionic/app-scripts": "1.3.7",
    "@ionic/cli-plugin-ionic-angular": "1.3.0",
    "typescript": "2.3.3"    
  }
}

离子信息

D:\03-bak\baiduoke>ionic info

全球套餐:

@ionic/cli-utils : 1.4.0
Cordova CLI      : not installed
Ionic CLI        : 3.4.0

本地包裹:

@ionic/app-scripts              : 1.3.7
@ionic/cli-plugin-cordova       : 1.4.0
@ionic/cli-plugin-ionic-angular : 1.3.0
Cordova Platforms               : none
Ionic Framework                 : ionic-angular 2.2.0

系统:

Node       : v6.10.0
OS         : Windows 10
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed
npm        : 5.0.3

我的错误我在运行命令

时遇到以下错误
    D:\03-bak\baiduoke>cordova platform add android
Using cordova-fetch for cordova-android@~6.2.2
                Error: Failed to fetch platform cordova-android@~6.2.2
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: cmd: Command failed with exit code 1 Error output:
npm ERR! Maximum call stack size exceeded

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\kid\AppData\Roaming\npm-cache\_logs\2017-06-13T08_58_46_055Z-debug.log`

当我运行cordova平台添加android或cordova插件时,我遇到了上述错误

1 个答案:

答案 0 :(得分:1)

  

Cordova CLI:未安装

您还需要安装cordova才能正常工作。 Ionic cli也使用cordova cli。

检查installation docs

执行:

class WSInterfaceFactory(WebSocketClientFactory):

    def __init__(self, queue, summary, dirOutput, contentType, model,
                 url=None, headers=None, debug=None):

        WebSocketClientFactory.__init__(self, url=url, headers=headers)
        self.queue = queue
        self.summary = summary
        self.dirOutput = dirOutput
        self.contentType = contentType
        self.model = model
        self.queueProto = Queue.Queue()

        self.openHandshakeTimeout = 10
        self.closeHandshakeTimeout = 10

        # start the thread that takes care of ending the reactor so
        # the script can finish automatically (without ctrl+c)
        endingThread = threading.Thread(target=self.endReactor, args=())
        endingThread.daemon = True
        endingThread.start()

然后尝试你的命令。