【问题标题】:Nativescript Vue RadSideDrawer undefinedNativescript Vue RadSideDrawer 未定义
【发布时间】:2019-04-07 01:09:13
【问题描述】:

我尝试创建启动 RadSideDrawer 示例https://play.nativescript.org/?template=play-vue&id=AZnAQ0

它适用于游乐场,但是当我使用它构建它时

tns run android --bundle

我收到一个错误

An uncaught Exception occurred on "main" thread.
java.lang.RuntimeException: Unable to start activity ComponentInfo{org.nativescript.application/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: 
Calling js method onCreate failed

TypeError: Could not load view for: nativeradsidedrawer. TypeError: Cannot read property 'extend' of undefined
File: "file:///data/data/org.nativescript.application/files/app/vendor.js, line: 59885, column: 6

StackTrace: 
    Frame: function:'getViewClass', file:'file:///data/data/org.nativescript.application/files/app/vendor.js', line: 63313, column: 11

我做错了什么?

【问题讨论】:

  • 刚刚拿了你的游乐场样本并在我的本地运行以下命令 - tns build android --bundle 和 tns run android --bundle。该应用程序正在正确加载。我使用 API 25 对其进行了测试。您使用的是什么 API 级别?
  • 您是否尝试过直接下载 Playground 示例并在本地机器上运行?只是为了确保您也在本地运行相同的配置。
  • 我有 10 页的项目。现在我想在主页中添加侧边栏但不能。我像在操场示例中一样创建页面并收到该错误
  • 下载的项目运行良好

标签: nativescript nativescript-telerik-ui nativescript-vue


【解决方案1】:

首先我们需要使用以下命令构建应用程序

tns 构建 android --bundle

一旦构建成功,我们必须运行下面的命令

tns 运行 android --bundle

【讨论】:

  • 下载的项目运行良好。我有 10 页的项目。现在我想在主页中添加侧边栏但不能。我像在操场示例中一样创建页面并收到该错误
【解决方案2】:

需要更新tns

tns update next

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-12-26
    • 2020-02-28
    • 2018-04-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-08-04
    相关资源
    最近更新 更多