【发布时间】:2016-08-28 06:39:23
【问题描述】:
尝试在模拟器上运行 Apple tv 应用程序时出现以下错误:
2016-08-27 23:38:46.139 appleTV_Sample[11498:5282178] ITML : SyntaxError: Unexpected token '<'...{
line = 1;
sourceURL = "http://localhost:9001//application.js";
}
appController(_:didFailWithError:) invoked with error: Error Domain=TVMLKitErrorDomain Code=3 "(null)"
以下是我在 js 文件中使用的代码:
var alertString = `<?xml version="1.0" encoding="UTF-8" ?>
<document>
<alertTemplate>
<title>${title}</title>
<description>${description}</description>
<button>
<text>OK</text>
</button>
</alertTemplate>
</document>`
感谢您提供任何解决此问题的建议。
【问题讨论】:
-
第 1 行出现语法错误。 SyntaxError: Unexpected token '