1

我一直在尝试实现 NativeScript UI入门指南中所说的基本仪表功能。但我收到以下错误: TypeError: com.telerik.widget.gauge.RadRadialView is not a constructor.

包.json:

{
    "description": "NativeScript Application",
    "license": "SEE LICENSE IN <your-license-filename>",
    "readme": "NativeScript Application",
    "repository": "<fill-your-repository-here>",
    "nativescript": {
        "id": "org.nativescript.ngModel",
        "tns-android": {
            "version": "3.5.0-rc-2018.1.8.1"
        }
    },
    "dependencies": {
        "@angular/animations": "~5.1.0",
        "@angular/common": "~5.1.0",
        "@angular/compiler": "~5.1.0",
        "@angular/core": "~5.1.0",
        "@angular/forms": "~5.1.0",
        "@angular/http": "~5.1.0",
        "@angular/platform-browser": "~5.1.0",
        "@angular/platform-browser-dynamic": "~5.1.0",
        "@angular/router": "~5.1.0",
        "allow-publish": "^1.0.4",
        "nativescript-angular": "~5.1.0",
        "nativescript-pro-ui": "^3.3.0",
        "nativescript-theme-core": "~1.0.4",
        "reflect-metadata": "~0.1.8",
        "rxjs": "~5.5.2",
        "tns-core-modules": "~3.4.0",
        "zone.js": "~0.8.2"
    },
    "devDependencies": {
        "babel-traverse": "6.4.5",
        "babel-types": "6.4.5",
        "babylon": "6.4.5",
        "lazy": "1.0.11",
        "nativescript-dev-typescript": "~0.6.0",
        "typescript": "~2.4.2"
    }
}

HTML 和组件代码与入门指南中的相同。

4

1 回答 1

2

尝试tns platform remove android然后tns run android。或 tns platform remove ios然后tns run ios

确保在添加nativescript-ui组件插件后删除并重新添加工作平台。不这样做有时会导致很多问题。

于 2018-05-22T08:20:34.797 回答