Pebble.js WatchApp显示:“已断开连接-运行pebble电话应用" [英] Pebble.js WatchApp displays: "Disconnected - run the pebble phone app"

查看:114
本文介绍了Pebble.js WatchApp显示:“已断开连接-运行pebble电话应用"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于此问题,我找不到太多文档.卵石上所有其他正在运行的应用程序均已连接到我的手机,并且可以按预期运行.但是,我当前正在使用的Pebble.js应用程序仅显示Disconnected - run the pebble phone app.

I can't find much documentation around this issue. All other running apps on my pebble have a connection to my phone, and work as expected. However, a Pebble.js application I'm currently working on simply displays Disconnected - run the pebble phone app.

我注意到在我的开发人员设置中,连接管理器被列为Disconnected.这是问题的一部分吗?我在日志中什么也看不到.

I have noticed that in my Developer Settings that the Connection Manager is listed as Disconnected. Is this part of the problem? I see nothing in the logs.

作为参考,该应用程序正在执行一个简单的ajax请求并显示结果.

For reference, the application is doing a simple ajax request and displaying the result.

推荐答案

此消息通常是由JavaScript在手机上崩溃(未定义的引用,未知的功能等)引起的,因此手表认为它没有运行.

This message is often caused by the JavaScript crashing on the phone (undefined reference, unknown function, etc) and so the watch thinks it is not running.

一些调试方法:

  • 用一个非常简单的console.log("hello world")语句替换您的代码,看看是否可行.
  • 查看日志(CloudPebble中的View Logs按钮或命令行中的pebble logs).
  • 在Android上,很少见到Pebble应用处于糟糕状态的情况,即它无法仅对一个应用执行JS.发生这种情况时,您需要强制杀死Pebble应用并重新启动它.
  • Replace your code with one very simple console.log("hello world") statement and see if this works.
  • Look at the Logs (View Logs button in CloudPebble or pebble logs on the command line).
  • Very rarely, on Android, I have seen situation where the Pebble app is in a bad state where it cannot execute the JS for only one app. When this happens, you need to force-kill the Pebble app and relaunch it.

这篇关于Pebble.js WatchApp显示:“已断开连接-运行pebble电话应用"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆