首页 文章

添加telerik ui插件后,NativeScript构建失败

提问于
浏览
0

我正在构建一个NativeScript应用程序 . 为了实现Drawer,我正在尝试使用'Telerik NativeScript UI'插件 . 但是,安装插件后,某些东西无效,我的NativeScript构建失败了 .

以下是构建失败的2个屏幕截图 .

enter image description here

enter image description here

我的package.json文件内容

{
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "readme": "NativeScript Application",
  "repository": "<fill-your-repository-here>",
  "nativescript": {
    "id": "org.nativescript.testapp",
    "tns-android": {
      "version": "2.0.0"
    }
  },
  "dependencies": {
    "@angular/common": "2.0.0-rc.1",
    "@angular/compiler": "2.0.0-rc.1",
    "@angular/core": "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-telerik-ui": "^1.1.1",
    "tns-core-modules": "^2.0.0"
  },
  "devDependencies": {
    "babel-traverse": "6.9.0",
    "babel-types": "6.10.2",
    "babylon": "6.8.1",
    "filewalker": "0.1.2",
    "lazy": "1.0.11",
    "nativescript-dev-typescript": "^0.3.2",
    "typescript": "^1.8.10"
  }
}

我的NativeScript CLI版本是2.0.1

任何想法,可能会出错?

-------It's fixed-------

得到错误后解决方案是..

  • 不要删除插件

  • 删除平台(android / ios)

  • 再次添加平台(android / ios)

  • 重建应用程序

2 回答

  • 3

    尝试

    platform remove android
    

    然后

    platform add android
    tns run android
    
  • 0

    每次我尝试向nativescript添加一个新插件(例如手机,telerik-UI和联系人插件)时,我都遇到过这个问题 . 对我有用的只是导航到 platform > android 然后运行 gradlew clean . 这样,每次添加插件时都不必重新添加android平台 .

相关问题