Sencha Touch App 在 Windows Phone 8 上崩溃 [英] Sencha Touch App crashes on Windows Phone 8

查看:22
本文介绍了Sencha Touch App 在 Windows Phone 8 上崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用 Sencha Touch 为 iOs 和 Android 开发了一个应用程序.现在我想把这些应用带到 Windows Phone 8.

I have developed an app for iOs and Android with Sencha Touch. Now i want bring these app to Windows Phone 8.

我将框架迁移到 2.2 并且一切正常.在 Windows 8 上的 Internet Explorer 10 中,该应用程序运行良好.但是当我尝试使用浏览器在 windows phone 上打开应用程序时,应用程序总是在相同的操作上崩溃.

I migrated the framework to 2.2 and all works fine. In the internet explorer 10 on Windows 8 the app works great. But when i try to open the app on the windows phone with the browser, the app crashes alway on the same action.

我使用卡片布局并手动销毁最后一个视图,因为我在此过程中获得了更好的体验.

I used a card layout and destroy the last view manually, because i made better experiences with this procedure.

我真的很绝望,因为我不知道在哪里可以解决它.不幸的是,没有像 chrome 那样的开发者控制台.从我的手动错误修复中,我知道 javascript 代码在调用函数之前一直有效.

I'm reale desperate, because i don't know where i can fix it. Unfortunately, there is no developer console like in chrome. From my manully bugfixing i know that the javascript code works till the and of the called function.

我也尝试使用 PhoneGap 构建该应用,但也存在同样的问题.

I also try the app as build with PhoneGap and there are the same problems.

是否有人知道,卡片布局和 windows phone 8 中的 Ext.Js 容器是否存在问题?

Does any body know, if there are some problems with a Ext.Js container in card layout and windows phone 8?

另外,有没有人知道在 Windows Phone 8 上检查 HTML/CSS/Javascript 代码的好方法?也许就像在 iPad 上一样.

And additional, does any body know a good way to check HTML/CSS/Javascript Code on the Windows Phone 8? Maybe on the same way like on the iPad.

推荐答案

按照以下链接中的步骤,我成功地在windows phone 8上部署了一个sencha touch应用程序:

I managed to successfully deploy an sencha touch application on windows phone 8 following the steps in the following link:

在 Windows Phone 上部署 Sencha 触控应用

我在安装 Git 后使用以下命令添加了我需要的插件,并将其设置为在 windows 的命令提示符下可用:

I added the plugins I needed using the following command after installing Git and set it to be available from the command prompt of windows:

cordova plugin add <URL_GIT_REPO>

我没有使用包文件,而是使用了命令:

Instead of using the package files, I used the command:

sencha app build native

我使用了在路径 SenchaTouchAppFolder/build/native/AppName 中生成的 app.jsapp.json 文件

and I used the app.js and app.json files generated that were created in the path SenchaTouchAppFolder/build/native/AppName

还做了以下事情:我必须获得一个开发者帐户,并在安装 visual studio 2012 expresswindows phone SDK 8 后检查设备.

also did the following: I had to get a developer account, and checked the device after installing visual studio 2012 express and windows phone SDK 8.

设备上以Debug模式部署应用时,可以在Visual Studio的输出窗口中查看异常信息.

When deploying the application on the device in Debug mode, you can view exception messages in the output window of Visual Studio.

首先确保项目包含 app.json 文件.例如,在输出窗口中构建解决方案应显示以下消息:

First make sure that the project includes the app.json file. For example to build the solution in the output window should display the following message:

1> Adding wwwapp.json

csproj文件中应包含以下元素:

In the csproj file should include the following elements:

<Content Include = "wwwapp.json" /> 
<Content Include = "www
esourcessampledata.json" />

我还修改了以下代码行,以从 cordovalib/XHRHelper.cs 文件的本地存储中添加对模型所需的 JSON 响应的支持.

I also modified the following lines of code to add support for JSON responses needed in the model from my local storage in cordovalib/XHRHelper.cs file.

 var funk = function () {
                        window.__onXHRLocalCallback = function (responseCode, responseText) {
                            alias.status = responseCode;
                            if (responseCode == '200') {
                                alias.responseText = responseText;
                                try {
                                    JSON.parse(responseText);
                                } catch (e) {
                                    Object.defineProperty(alias, 'responseXML', {
                                        get: function () {
                                            return new DOMParser().parseFromString(this.responseText, 'text/xml');
                                        }
                                    });
                                }
                                Object.defineProperty(alias, 'responseJSON', {
                                    get: function () {
                                        return new DOMParser().parseFromString(this.responseText, 'text/json');
                                    }
                                });

                            }else {
                                alias.onerror && alias.onerror(responseCode);
                            }

一个有用的调试css错误的工具是仿真工具internet explorer 11

A useful tool to debug css errors is the emulation tool internet explorer 11

F12 > Emulation > Explorer Profile > Windows Phone 

这个工具也很有用:使用 weinre 在 Windows Phone 上远程 HTML5 调试

这篇关于Sencha Touch App 在 Windows Phone 8 上崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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