【发布时间】: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