简体   繁体   English

更新appcelerator导致android应用崩溃

[英]Updating appcelerator caused android app to crash

I am having issues with appcelerator, anybody with pervious experience had any issues with it? 我在使用appcelerator时遇到问题,任何有过往经验的人都对此有任何疑问? if it wasn't for a 3 year project on appcelerator I would have switched. 如果不是在appcelerator上进行为期3年的项目,我会改了。 Anyway i believe to have fixed the error just need clarifying why i need to change this now when it worked perfectly before. 无论如何,我认为已经修复了该错误,只需要弄清楚为什么在以前完美工作时就需要立即更改此错误。 This is the error that appears when I try and load a new window. 这是我尝试加载新窗口时出现的错误。

[ERROR] :  TiExceptionHandler: (main) [6174,104116] ----- Titanium Javascript Runtime Error -----
[ERROR] :  TiExceptionHandler: (main) [1,104117] - In ti:/view.js:19,10
[ERROR] :  TiExceptionHandler: (main) [0,104117] - Message: Uncaught Error: Cannot add window/tabGroup to a view.
[ERROR] :  TiExceptionHandler: (main) [1,104118] - Source:          throw new Error("Cannot add window/tabGroup to a view.");

to fix the issue I have to switch all of my tags from <Window> to <View> . 要解决此问题,我必须将所有标签从<Window>切换到<View> I believe the issue is to do with the fact you can't have two windows loaded at the same time, I just need clarification why it now suddenly has stopped working!!! 我相信问题在于您不能同时加载两个窗口,我只需要澄清为什么现在突然停止工作!

UPDATE 更新

When I change the xml to <View> the android app will run fine, however this causes the iOS app to now no run, any ideas? 当我将xml更改为<View> ,Android应用程序可以正常运行,但是这导致iOS应用程序现在无法运行,有什么想法吗?

So the error is pretty straightforward, you cannot add a <Window> to a View. 因此错误非常简单明了,您不能在视图中添加<Window> So... the root needs to be either a <Window> or <NavigationWindow> . 因此...根目录必须是<Window><NavigationWindow> On Android the navigationWindow doesn't exist. 在Android上,navigationWindow不存在。 So you need to have Android specific UI, or iOS specific UI. 因此,您需要具有Android特定的UI或iOS特定的UI。 You can also use the commonJS module xp.ui for Titanium to get NavigationWindow to work on Android: https://github.com/FokkeZB/UTiL/blob/master/docs/xp.ui.md (just follow instructions how to install). 您还可以使用用于Titanium的commonJS模块xp.ui来使NavigationWindow在Android上运行: https : //github.com/FokkeZB/UTiL/blob/master/docs/xp.ui.md (请按照说明进行安装)。

An app needs a Window or NavigationWindow as a root to work properly. 应用程序需要Window或NavigationWindow作为根目录才能正常工作。 So... having neither of these will make the app not work. 所以...如果没有这些都将使该应用程序无法正常工作。

So I recommend the module, and then use NavigationWindow > Window construction. 因此,我推荐该模块,然后使用NavigationWindow> Window构造。

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

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