而不是在手机上运行

而不是在手机上运行

本文介绍了Phonegap - 应用程序在桌面上运行,而不是在手机上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用HTML,CSS和JS创建了一个Web应用程序。在应用程序的前几个阶段,我已经使用Phonegap Build成功将它加载到我的手机上,并且在那里工作(仍然存在大量的错误)。


现在,我修复了所有错误并使应用程序更漂亮,并且在我的计算机上完美运行(即使在我的手机型号为)。
事情是,当我使用Phonegap Build时,就像我之前做的那样,在我的手机中,应用程序没有响应,也不起作用。这让我怀疑:

Phonegap可以做些什么限制?或者任何在桌面上工作的应该也能工作?


为了查看到底发生了什么,我在DOM中添加了一个 #console 元素,并在每个操作中记录下来。看起来, $(document).ready()正在工作,但这就是它。它不会响应点击,也不会提交表单。


我不能在这里发布代码,因为它太长了。

解决方案

我用你的代码构建了一个android应用程序。因为我使用 cordova ,因此我将phonegap.js更改为cordova.js并且效果很好。

p>


I have created a web app using HTML, CSS and JS. In previous stages of the app, I have successfully loaded it on to my phone using Phonegap Build, and it "worked" there (still had a ton of bugs).

Now, I have fixed all the bugs and made the app prettier, and it works perfectly on my computer (even in chrome's device simulation with my phone's model in there).
The thing is, when I use Phonegap Build just like I did before, in my phone, the app doesn't respond, and it doesn't work. That made me wonder:
Are there some limitations to what you can do with Phonegap? Or whatever works on the desktop should work too?

To see exactly what's going on, I added a #console element to the DOM, and logged there in every action. It seems that the $(document).ready() is working, but that's pretty much it. It doesn't respond to clicks, nor to form submits.

I cannot post the code here because it's way too long.

解决方案

i have build a android app with your code.

Because I use cordova so I change your phonegap.js into cordova.js and it works well.

这篇关于Phonegap - 应用程序在桌面上运行,而不是在手机上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 21:42