【问题标题】:nativescript errorPubNub call failed, check status for detailsnativescript errorPubNub 调用失败,查看状态了解详情
【发布时间】:2019-04-25 09:55:06
【问题描述】:

我设置 NativeScriptwithn angular 6 并且每个依赖项都已正确安装,但这些步骤出现以下错误

1) tns 运行 --bundle

2) 然后选择选项同步到游乐场

3) 在我的安卓手机上扫描 Playground 应用中的二维码

4) 显示状态:已成功发送 Android 平台的初始文件。

之后可以看到这个错误

Error: PubNub call failed, check the status for details at new PubNubError (/usr/local/lib/node_modules/nativescript/node_modules/pubnub/lib/core/components/core/components/endpoint.js:8:31) at onResponse (/usr/local/lib/node_modules/nativescript/node_modules/pubnub/lib/core/components/core/components/endpoint.js:126:32) at <anonymous> (/usr/local/lib/node_modules/nativescript/node_modules/pubnub/lib/networking/modules/networking/modules/web-node.js:59:17) at Request.callback (/usr/local/lib/node_modules/nativescript/node_modules/superagent/lib/node/index.js:728:3) at RequestBase._timeoutError (/usr/local/lib/node_modules/nativescript/node_modules/superagent/lib/request-base.js:676:8) at Timeout.<anonymous> (/usr/local/lib/node_modules/nativescript/node_modules/superagent/lib/request-base.js:685:12) at ontimeout (timers.js:475:11) at tryOnTimeout (timers.js:310:5) at Timer.listOnTimeout (timers.js:270:5)

我还可以在使用命令tns run --bundle 运行项目后看到一些警告

1) ANDROID_HOME 环境变量未设置或指向不存在的目录。您将无法为 Android 执行任何与构建相关的操作。

2) 警告:来自 Android SDK 的 adb 未安装或配置不正确。

3)警告:Android SDK 未安装或配置不正确。

4) 找不到兼容的 Android SDK 进行编译。为了能够为 Android 构建,请安装 Android SDK 28 或更高版本。 运行 $ sdkmanager 来管理您的 Android SDK 版本。

5) 您需要在系统上安装 Android SDK 构建工具。您可以安装以下范围内的任何版本:'>=23

【问题讨论】:

    标签: angular angular6 nativescript angular2-nativescript nativescript-angular


    【解决方案1】:

    您的 ANDROID_HOME 环境变量似乎设置不正确。您可以按照这个问题的建议在不同的操作系统上进行设置。至少它会删除您收到的警告。

    Error: ANDROID_HOME is not set and "android" command not in your PATH. You must fulfill at least one of these conditions.

    【讨论】:

    • 你是对的丹尼尔,但这个解决方案适用于 windows 系统,而不是 ubuntu
    • 抱歉,没注意到你写的是关于 ubuntu 的文章。
    【解决方案2】:

    我解决了我的问题 这个问题是在Ubuntu系统上设置环境 我提供链接并遵循所有说明和命令 https://evothings.com/doc/build/cordova-install-linux.html 我希望每个人都使用此链接并解决您的问题

    【讨论】:

      【解决方案3】:

      我也遇到了这个错误。

      我的程序如下

      1. 我只是通过键入 tns create appName --ng 创建我的 NativeScript 应用程序
      2. 然后我尝试通过键入tns preview 打开应用程序

      忘记了,问题是缺少安装 Latest NativeScriptCLI

      修复了在目录中执行npm install -g nativescript@latest

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2017-10-09
        • 2013-06-19
        • 1970-01-01
        • 1970-01-01
        • 2021-04-08
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多