Sencha touch production build errors

别等时光非礼了梦想. 提交于 2019-12-11 22:17:29

问题


Using touch 2.1.0 and Cmd 3.1.2.342

Whilst trying to create a production version of my sencha app, I get the following error:

[WRN] C1003: Unsupported Ext.define syntax -- C:\wamp\www\touch-2.1.0\axis\nativ e\appname\touch\src\fx\TimingFunctions.js:109

[ERR] C2008: Requirement had no matching files (Ext.fx.TimingFunctions) -- C:\wa mp\www\touch-2.1.0\axis\native\appname\touch\src\fx\Abstract.js:959

[ERR] The following error occurred while executing this line: C:\wamp\www\touch-2.1.0\axis\native\appname.sencha\app\build-impl.xml:165:

It seems to me that it is saying a file called fx/TimingFunctions.js is required by fx/Abstract.js but cannot be found. However, this can't be what it means as the file exists in that folder.

The command I am using is:

sencha app build production

Line 109 of TimingFunctions.js looks like this:
Ext.define('Ext.fx.TimingFunctions', Ext.apply({ singleton: true,...

One solution is to change line 109 of TimingFunctions.js from:

Ext.define('Ext.fx.TimingFunctions', Ext.apply({

to:

Ext.define('Ext.fx.TimingFunctions', {

and change line 136 of the same file from:

}, EasingPrototype));

to:

}, EasingPrototype);

This then allows the build to go ahead.

However, when I then view the production app in the web browser, it freezes and I get the following error

Uncaught TypeError: Object # has no method 'call' process sencha-touch-all-debug.js:6767

(anonymous function) process sencha-touch-all-debug.js:6774

(anonymous function) sencha-touch-all-debug.js:6779

Ext.apply.onBeforeCreated sencha-touch-all-debug.js:5196

process sencha-touch-all-debug.js:5262

process sencha-touch-all-debug.js:5268

process sencha-touch-all-debug.js:5268

process sencha-touch-all-debug.js:5268

Ext.apply.process sencha-touch-all-debug.js:5272

Ext.Class.ExtClass sencha-touch-all-debug.js:5183

Ext.ClassManager.create sencha-touch-all-debug.js:6725 Ext.apply.define sencha-touch-all-debug.js:7407

(anonymous function) TimingFunctions.js?_dc=1379403994382:109

(anonymous function) TimingFunctions.js?_dc=1379403994382:138


回答1:


There was a spelling mistake in the files fx/Abstract.js and fx/TimingFunctions.js Actually, it's not a spelling mistake - more like a grammatical error.

Abstract.js calls a function in TimingFunctions.js. in Abstract.js it is referred to as EasingMap, where as in TimingFunctions.js it is called easingMap



来源:https://stackoverflow.com/questions/18742848/sencha-touch-production-build-errors

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!