2013-03-14 3 views
0

Я использую Sencha Touch версии 2.1.1 и CMD версии 3.0.2.288.Производственная сборка не найдена

Я конвертирую действующее приложение 2.0 в 2.1.

Когда я создаю приложение и запускаю его, я получаю ошибки, указывающие, что представления не могут быть загружены. Когда я смотрю в папку сборки по пути, указанному этой ошибкой, просмотров нет.

Здесь ошибка:

http://localhost:8888/Mobile/build/a...24263186Failed to load resource: the server responded with a status of 404 (Not Found) 

Приложение отлично работает в Safari перед сборкой. У кого-нибудь есть идеи?

Выход из сборника ниже

Sencha Cmd v3.0.2.288 
[INF]  
[INF]  init-properties: 
[INF]  
[INF]  init-sencha-command: 
[INF]  
[INF]  init: 
[INF]  
[INF]  -before-app-build: 
[INF]  
[INF]  app-build-impl: 
[INF]  
[INF]  production: 
[INF]  
[INF]  -before-init-local: 
[INF]  
[INF]  -init-local: 
[INF]  
[INF]  -after-init-local: 
[INF]  
[INF]  init-local: 
[INF]  
[INF]  find-cmd: 
[INF]  
[INF]  -before-init: 
[INF]  
[INF]  -init: 
[INF]  
[INF]  -after-init: 
[INF]  
[INF]  init: 
[INF]  
[INF]  -before-build: 
[INF]  
[INF]  sass: 
[INF]  
[INF]  page: 
[INF]  
[INF]  -before-page: 
[INF]  
[INF]  -page: 
[INF]  building application 
[INF]  Deploying your application to /Applications/MAMP/htdocs/Mobile/build/app/production 
[INF]  Copied /Applications/MAMP/htdocs/Mobile/./app.js to /Applications/MAMP/htdocs/Mobile/build/app/production/app.js 
[INF]  Copied /Applications/MAMP/htdocs/Mobile/./resources/css/app.css to /Applications/MAMP/htdocs/Mobile/build/app/production/resources/css/app.css 
[INF]  Copied /Applications/MAMP/htdocs/Mobile/./resources/images 
[INF]  Copied /Applications/MAMP/htdocs/Mobile/./resources/icons 
[INF]  Copied /Applications/MAMP/htdocs/Mobile/./resources/loading 
[INF]  Copied /Applications/MAMP/htdocs/Mobile/./resources/data 
[INF]  Resolving your application dependencies (file:////Applications/MAMP/htdocs/Mobile/./index.html) 
[INF]  Compiling app.js and dependencies 
[INF]  Processing classPath entry : /Applications/MAMP/htdocs/Mobile/sencha-compile-temp-dir 
[INF]  Processing classPath entry : /Applications/MAMP/htdocs/Mobile/touch/src 
[INF]  Processing classPath entry : /Applications/MAMP/htdocs/Mobile/app.js 
[INF]  Processing classPath entry : /Applications/MAMP/htdocs/Mobile/app 
[INF]  Processing class inheritance graph 
[INF]  Processing instantiation refereces to classes and aliases 
[INF]  Processing source dependencies 
[INF]  Concatenating output to file /Applications/MAMP/htdocs/Mobile/build/app/production/app.js 
[INF]  Completed compilation. 
[INF]  Processed remote file touch/sencha-touch.js 
[INF]  Processed local file app.js 
[INF]  Minified app.js 
[INF]  Generated delta for: app.js from hash: '0cf2d66c793df3275db06ce3c88737d55b92c0ac' to hash: '166f3da44e90c243ec58c2be30af4149922d4f2d' 
[INF]  Generated delta for: app.js from hash: '3defd723a308dffa24d79abe9b36efaea9b7fa2c' to hash: '166f3da44e90c243ec58c2be30af4149922d4f2d' 
[INF]  Generated delta for: app.js from hash: '68b15cd8c4470cae367618d56d2221f750fe94c5' to hash: '166f3da44e90c243ec58c2be30af4149922d4f2d' 
[INF]  Generated delta for: app.js from hash: '7abfe02aa5647b33770d8584330c838c7228e6a3' to hash: '166f3da44e90c243ec58c2be30af4149922d4f2d' 
[INF]  Generated delta for: app.js from hash: '955de9ce50a676d272e4b81984164be49b347f01' to hash: '166f3da44e90c243ec58c2be30af4149922d4f2d' 
[INF]  Generated delta for: app.js from hash: 'bb51ed6de771efa962e01e67807e488d760b63a0' to hash: '166f3da44e90c243ec58c2be30af4149922d4f2d' 
[INF]  Generated delta for: app.js from hash: 'ce841c66ba0f08125ef8a850960c4b0366ef061f' to hash: '166f3da44e90c243ec58c2be30af4149922d4f2d' 
[INF]  Generated delta for: app.js from hash: 'd09ff9bd2f3c719c21fe44c3a7d6a2f3690bc816' to hash: '166f3da44e90c243ec58c2be30af4149922d4f2d' 
[INF]  Generated delta for: app.js from hash: 'fbb192007fd273dd08359e426311be7688656b2a' to hash: '166f3da44e90c243ec58c2be30af4149922d4f2d' 
[INF]  Minified resources/css/app.css 
[INF]  Generated app.json 
[INF]  Embedded microloader into index.html 
[INF]  Generating appcache 
[INF]  Generating checksum for appCache item: index.html 
[INF]  Generating checksum for appCache item: resources/css/app.css 
[INF]  Generating checksum for appCache item: resources/data/data.json 
[INF]  Generating checksum for appCache item: resources/images/Billing.png 
[INF]  Generating checksum for appCache item: resources/images/[email protected] 
[INF]  Generating checksum for appCache item: resources/images/Biochem.png 
[INF]  Generating checksum for appCache item: resources/images/[email protected] 
[INF]  Generating checksum for appCache item: resources/images/Contact.png 
[INF]  Generating checksum for appCache item: resources/images/[email protected] 
[INF]  Generating checksum for appCache item: resources/images/Cyto.png 
[INF]  Generating checksum for appCache item: resources/images/[email protected] 
[INF]  Generating checksum for appCache item: resources/images/Disclosure.png 
[INF]  Generating checksum for appCache item: resources/images/[email protected] 
[INF]  Generating checksum for appCache item: resources/images/FAQ.png 
[INF]  Generating checksum for appCache item: resources/images/[email protected] 
[INF]  Generating checksum for appCache item: resources/images/Feedback.png 
[INF]  Generating checksum for appCache item: resources/images/[email protected] 
[INF]  Generating checksum for appCache item: resources/images/IntegratedTesting.png 
[INF]  Generating checksum for appCache item: resources/images/[email protected] 
[INF]  Generating checksum for appCache item: resources/images/Molecular.png 
[INF]  Generating checksum for appCache item: resources/images/[email protected] 
[INF]  Generating checksum for appCache item: resources/images/S.png 
[INF]  Generating checksum for appCache item: resources/images/[email protected] 
[INF]  Generating checksum for appCache item: resources/images/TestMenu.png 
[INF]  Generating checksum for appCache item: resources/images/[email protected] 
[INF]  Generating checksum for appCache item: resources/loading/Default-LandscapeLeft~ipad.png 
[INF]  Generating checksum for appCache item: resources/loading/Default-LandscapeRight~ipad.png 
[INF]  Generating checksum for appCache item: resources/loading/Default-Landscape~ipad.png 
[INF]  Generating checksum for appCache item: resources/loading/Default-PortraitUpsideDown~ipad.png 
[INF]  Generating checksum for appCache item: resources/loading/Default-Portrait~ipad.png 
[INF]  Generating checksum for appCache item: resources/loading/Default.png 
[INF]  Generating checksum for appCache item: resources/loading/[email protected] 
[INF]  Generating checksum for appCache item: resources/loading/Default~ipad.png 
[INF]  Generating checksum for appCache item: resources/loading/Homescreen.jpg 
[INF]  Generating checksum for appCache item: resources/loading/Homescreen~ipad.jpg 
[INF]  Successfully deployed your application to /Applications/MAMP/htdocs/Mobile/build/app/production 
[INF]  
[INF]  -after-page: 
[INF]  
[INF]  run: 
[INF]  
[INF]  -build: 
[INF]  
[INF]  -after-build: 
[INF]  
[INF]  build: 
[INF]  
[INF]  -after-app-build: 
[INF]  
[INF]  app-build: 

Вот мой app.json:

{ 
    /** 
    * The application's namespace, used by Sencha Command to generate classes 
    */ 
    "name": "App", 

    /** 
    * List of all JavaScript assets in the right execution order. 
    * Each item is an object with the following format: 
    *  { 
    *   "path": "path/to/script.js" // Relative path to this app.json file 
    *   "update": "delta"   // (Optional) 
    *          // - If not specified, this file will only be loaded once, and 
    *          // cached inside localStorage until this value is changed. 
    *          // - "delta" to enable over-the-air delta update for this file 
    *          // - "full" means full update will be made when this file changes 
    * 
    *  } 
    */ 
    "js": [ 
     { 
      "path": "touch/sencha-touch.js" 
     }, 
     { 
      "path": "app.js", 
      "update": "delta" 
     } 
    ], 

    /** 
    * List of all CSS assets in the right inclusion order. 
    * Each item is an object with the following format: 
    *  { 
    *   "path": "path/to/item.css" // Relative path to this app.json file 
    *   "update": "delta"   // (Optional) 
    *          // - If not specified, this file will only be loaded once, and 
    *          // cached inside localStorage until this value is changed to either one below 
    *          // - "delta" to enable over-the-air delta update for this file 
    *          // - "full" means full update will be made when this file changes 
    * 
    *  } 
    */ 
    "css": [ 
     { 
      "path": "resources/css/app.css", 
      "update": "delta" 
     } 
    ], 

    /** 
    * Used to automatically generate cache.manifest (HTML 5 application cache manifest) file when you build 
    */ 
    "appCache": { 
     /** 
     * List of items in the CACHE MANIFEST section 
     */ 
     "cache": [ 
      "index.html", 
      "resources/css/app.css", 
      "resources/data/data.json", 
      "resources/images/Billing.png", 
      "resources/images/[email protected]", 
      "resources/images/Biochem.png", 
      "resources/images/[email protected]", 
      "resources/images/Contact.png", 
      "resources/images/[email protected]", 
      "resources/images/Cyto.png", 
      "resources/images/[email protected]", 
      "resources/images/Disclosure.png", 
      "resources/images/[email protected]", 
      "resources/images/FAQ.png", 
      "resources/images/[email protected]", 
      "resources/images/Feedback.png", 
      "resources/images/[email protected]", 
      "resources/images/IntegratedTesting.png", 
      "resources/images/[email protected]", 
      "resources/images/Molecular.png", 
      "resources/images/[email protected]", 
      "resources/images/S.png", 
      "resources/images/[email protected]", 
      "resources/images/TestMenu.png", 
      "resources/images/[email protected]", 
      "resources/loading/Default-LandscapeLeft~ipad.png", 
      "resources/loading/Default-LandscapeRight~ipad.png", 
      "resources/loading/Default-Landscape~ipad.png", 
      "resources/loading/Default-PortraitUpsideDown~ipad.png", 
      "resources/loading/Default-Portrait~ipad.png", 
      "resources/loading/Default.png", 
      "resources/loading/[email protected]", 
      "resources/loading/Default~ipad.png", 
      "resources/loading/Homescreen.jpg", 
      "resources/loading/Homescreen~ipad.jpg" 
      //"touch/sencha-touch.js", 

     ], 
     /** 
     * List of items in the NETWORK section 
     */ 
     "network": [ 
      "*" 
     ], 
     /** 
     * List of items in the FALLBACK section 
     */ 
     "fallback": [] 
    }, 

    /** 
    * Extra resources to be copied along when build 
    */ 
    "extras": [ 
     "resources/images", 
     "resources/icons", 
     "resources/loading", 
     "resources/data" 
    ], 

    /** 
    * Directory path to store all previous production builds. Note that the content generated inside this directory 
    * must be kept intact for proper generation of delta between updates 
    */ 
    "archivePath": "archive", 

    /** 
    * Default paths to build this application to for each environment 
    */ 
    "buildPaths": { 
     "testing": "build/testing", 
     "production": "build/production", 
     "package": "build/package", 
     "native": "build/native" 
    }, 

    /** 
    * Build options 
    */ 
    "buildOptions": { 
     "product": "touch", 
     "minVersion": 3, 
     "debug": false, 
     "logger": "no" 
    }, 

    /** 
    * Uniquely generated id for this application, used as prefix for localStorage keys. 
    * Normally you should never change this value. 
    */ 
    "id": "996b4be0-9f88-11e1-b590-67deda5f4cdb" 
} 

Вот это app.js

Ext.Loader.setPath({ 
    'Ext': 'touch/src' 
}); 


Ext.application({ 
    name: 'App', 

    requires: [ 
     'Ext.MessageBox' 
    ], 

    views: [ 
     'Main', 
     'Homepage', 
     'Sections', 
     'Detail', 
     'RequisitionRequest' 
    ], 

    models: [ 
     'Sections' 
    ], 

    stores: [ 
     'Sections' 
    ], 

    controllers: [ 
     'Main' 
    ], 

    icon: { 
     57: 'resources/icons/Icon.png', 
     72: 'resources/icons/Icon~ipad.png', 
     114: 'resources/icons/[email protected]', 
     144: 'resources/icons/[email protected]' 
    }, 

    phoneStartupScreen: 'resources/loading/Homescreen.jpg', 
    tabletStartupScreen: 'resources/loading/Homescreen~ipad.jpg', 

    launch: function() { 
     // Destroy the #appLoadingIndicator element 
     Ext.fly('appLoadingIndicator').destroy(); 

     // Initialize the main view 
     Ext.Viewport.add(Ext.create('App.view.Main')); 
     // Initialize the requisition request view 
     //Ext.Viewport.add(Ext.create('App.view.RequisitionRequest')); 
    }, 

    onUpdated: function() { 
     Ext.Msg.confirm(
      "Application Update", 
      "This application has just successfully been updated to the latest version. Reload now?", 
      function(buttonId) { 
       if (buttonId === 'yes') { 
        window.location.reload(); 
       } 
      } 
     ); 
    } 
}); 
+0

При создании приложения нет ошибок или предупреждений? –

+0

Нет ошибок. Все правильно компилируется (вставка вывода выше в моем исходном сообщении). В качестве эксперимента я скомпилировал одно из примеров приложений, и он работает нормально. Я думаю, что между 2.0 и 2.1.1 может быть что-то другое, что мне нужно изменить, но я этого не вижу. – creatvepro

+0

Ну, когда вы создаете приложение, он скомпилирует все JS-файлы в 'app.js', поэтому в этой папке не будет ничего, кроме этого. Вы посмотрели на финальный (build) 'app.js'? Ваши взгляды там? – jakerella

ответ

2

Проблема решена! Следующий сниппет был внизу моего обзора Main.js, и я полностью пропустил его. После того, как я удалил его, приложение работает правильно после сборки.

/** 
* Fix for Bug TOUCH-2665 (Sencha Touch 2.0.1 RC) 
* must be removed in next release 
*/ 
Ext.define('App.Tabfix', { 
    override: 'Ext.tab.Panel', 
    doTabChange: function(tabBar, newTab) { 
     this.setActiveItem(tabBar.indexOf(newTab)); 
    } 
});