0

最近我将我的 NativeScript CLI 更新到 2.1.0 并安装了 Telerik UI 插件。之后。我的应用程序构建失败并出现错误“实际参数列表和形式参数列表长度不同”。

截屏 -

在此处输入图像描述

包.json

{
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "readme": "NativeScript Application",
  "repository": "<fill-your-repository-here>",
  "nativescript": {
    "id": "org.nativescript.bhramaan",
    "tns-android": {
      "version": "2.1.1"
    }
  },
  "dependencies": {
    "@angular/common": "2.0.0-rc.1",
    "@angular/compiler": "2.0.0-rc.1",
    "@angular/core": "2.0.0-rc.1",
    "@angular/http": "2.0.0-rc.1",
    "@angular/platform-browser": "2.0.0-rc.1",
    "@angular/platform-browser-dynamic": "2.0.0-rc.1",
    "@angular/platform-server": "2.0.0-rc.1",
    "@angular/router-deprecated": "2.0.0-rc.1",
    "nativescript-angular": "0.1.1",
    "nativescript-plugin-firebase": "^3.0.1",
    "tns-core-modules": "^2.0.0"
  },
  "devDependencies": {
    "babel-traverse": "6.9.0",
    "babel-types": "6.9.0",
    "babylon": "6.8.0",
    "filewalker": "0.1.2",
    "lazy": "1.0.11",
    "nativescript-dev-typescript": "^0.3.2",
    "typescript": "^1.8.10"
  }
}

我还删除了平台并再次添加。但是,现在仍然没有运气。

4

1 回答 1

3

这是你的问题:

"tns-android": {
  "version": "2.1.1"
}
"tns-core-modules": "^2.0.0"

必须拥有 TNS/NativeScript-CLI、TNS-Common-Core 和 TNS-Platforms 相同的版本。

键入:tns info以轻松查看您的版本。


以下是升级步骤:

升级 NativeScript 命令行

npm install -g nativescript@latest

升级 NativeScript Common Core 库

npm install tns-core-modules@latest --save

升级平台(将 android 替换为 ios for iOS)

tns platform remove android
tns platform add android
于 2016-07-01T19:34:09.717 回答