问题
I have finally managed to create a production build of my sencha web app using Cmd 3.10.2.342 and touch 2.2.1
All my bespoke files are included and deltas are created as one would expect. However, when I run it in the browser, it stalls at the loading view. Console log says:
TypeError: 'undefined' is not a function (evaluating 'h.call(w,w)')
I have traced the error to Ext.application({...
in app.js.
I have tried the following changes, but still get errors:
- new Ext.application({...
- Ext.Application({...
- new Ext.Application({...
How can I rectify this?
When I generate an apk file, I do not have this problem
In my production app.js, I found thisif(!s){a.set(i,w);if(h){h.call(w,w)}a.triggerCreated(i);return}
I don't really know what it does. I have tried deleting it etc, but it just the gives other errors instead
回答1:
I traced this back to issues/conflicts with itemId
and id
where sencha was telling me that a component already existed and should be destroyed.
Solved it by removing id
and itemId
and used cls
instead
来源:https://stackoverflow.com/questions/18761608/sencha-build-error-when-viewed-in-browser