0

我创建了一个 html5 游戏。

根据 bb10 webworks 指南,我制作了 config.xml 文件。我的游戏在涟漪模拟器中运行良好。但是当我在 BB10 Dev Alpha Simulator 中测试它时,只出现黑屏.. 有什么问题?我在这里上传了我的代码。

配置文件

<?xml version="1.0" encoding="UTF-8"?>
    <widget xmlns="http://www.w3.org/ns/widgets"
    xmlns:rim="http://www.blackberry.com/ns/widgets"
    version="1.0.0.5" id="mani" xml:lang="en">
     <author href="http://www.example.com/"
      rim:copyright="Copyright 1998-2012 My Corp">My Corp</author>
      <name>mani</name>
<icon src="logo.png"/>
    <content src="index.html"/>
    <feature id="blackberry.identity" required="true" version="1.0.0.0"/>
    </widget>

我在 index.html 文件中添加了脚本标签。其余的东西是不变的。

索引.html

      <script src="local:///chrome/webworks.js" type="text/javascript"></script>    
4

1 回答 1

0

If you are getting a black screen, then I expect there is a runtime error that has prevented your game from starting and/or

Here are instructions on how to use remote-web inspector. I recommend connecting, opening the console panel and reloading your app. It should tell you right away if there is an error: https://developer.blackberry.com/html5/documentation/web_inspector_overview_1553586_11.html

Do you have any remote content being used in your app? If so, I suspect the application does not have permission to access that content as I don't see any <access> elements in your config.xml. Make sure you properly whitelist all remote URLs: https://developer.blackberry.com/html5/documentation/access_element_834677_11.html

于 2013-04-08T18:16:00.430 回答