简体   繁体   English

PhoneGap应用程序仅在首次启动后才能工作

[英]PhoneGap app works only after first start

Im doing an app for Android. 我正在为Android开发应用程序。 I'm using Genymotion for debug. 我正在使用Genymotion进行调试。 Everythings working perfectly there. 那里的一切都很好。 However, when i'm trying on my phone, the first run after install will go fine. 但是,当我在手机上尝试安装后,第一次运行会很好。 After that i kill the app from the task manager and start the app again. 之后,我从任务管理器中删除了该应用程序,然后再次启动该应用程序。 Many of the JavaScripts are failing, some of working, but the weirdest thing is that even alert() not working anywhere. 许多JavaScript都失败了,有些还在工作,但是最奇怪的是,即使alert()无法在任何地方工作。 Anybody had the same problem before? 有人遇到过同样的问题吗? Or any advices? 或任何建议? Maybe it's a cache, phone, ROM related thing? 也许是缓存,电话,ROM相关的东西?

UPDATE UPDATE

What i've tried so far: 到目前为止,我已经尝试过:

<preference name="KeepRunning" value="false"/>

android:clearTaskOnLaunch="true"

启用phonegap的控制台插件,并监视logcat日志以查找可能发生的任何错误。

Couldn't find any real fix in hours. 数小时内找不到任何真正的解决方法。 Tried the unaligned version of the APK and it's working fine, so it must be something with the ziptool, i'll try with other ones. 尝试了APK的未对齐版本,并且可以正常工作,因此它必须与ziptool兼容,我将与其他工具一起尝试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM