Question

My mobile application made with Sencha Touch 2.3.X and Architect doesn't want to start on my Android device (the blue pending sencha screen is displayed) but it works great into my desktop browser.

Here is my app.js :

 // @require @packageOverrides
Ext.Loader.setConfig({

});


Ext.application({
    models: [
        'Business'
    ],
    stores: [
        'BusinessStore'
    ],
    views: [
        'MainView',
        'LoginForm',
        'MainNavInterventions',
        'ListContainerInterventions',
        'ListContainerMaintenances',
        'MainNavMaintenances',
        'Carousel',
        'HomeContainer',
        'MainNavHome',
        'DetailPanelView',
        'MainNavPetitstravaux',
        'ListContainerPetitsTravaux'
    ],
    requires: [
        'Ext.MessageBox'
    ],
    controllers: [
        'Account',
        'Business'
    ],
    name: 'Kone',

    launch: function() {

        Ext.create('Kone.view.Carousel', {fullscreen: true});
    }

});

Here is my View : Carousel.js :

    Ext.define('Kone.view.Carousel', {
    extend: 'Ext.carousel.Carousel',
    alias: 'widget.carousel',

    requires: [
        'Kone.view.MainNavHome',
        'Kone.view.MainNavInterventions',
        'Kone.view.MainNavMaintenances',
        'Kone.view.MainNavPetitstravaux'
    ],

    config: {
        id: 'carousel',
        itemId: 'carousel',
        items: [
            {
                xtype: 'mainnavhome',
                centered: false
            },
            {
                xtype: 'mainnavinterventions'
            },
            {
                xtype: 'mainnavmaintenances',
                itemId: 'mainnavmaintenances'
            },
            {
                xtype: 'mainnavpetitstravaux',
                itemId: 'mainnavpetitstravaux'
            }
        ]
    }

});

Here are my carousel items Views :

MainNavHome.js :

Ext.define('Kone.view.MainNavHome', {
    extend: 'Ext.navigation.View',
    alias: 'widget.mainnavhome',

    requires: [
        'Kone.view.HomeContainer'
    ],

    config: {
        id: '',
        items: [
            {
                xtype: 'homecontainer',
                title: 'Tableau de bord'
            }
        ]
    }

});

MainNavInterventions.js :

Ext.define('Kone.view.MainNavInterventions', {
    extend: 'Ext.navigation.View',
    alias: 'widget.mainnavinterventions',

    requires: [
        'Kone.view.ListContainerInterventions'
    ],

    config: {
        id: 'mainnavinterventions',
        itemId: 'mainnavinterventions',
        useTitleForBackButtonText: true,
        items: [
            {
                xtype: 'listcontainerinterventions',
                title: 'Interventions'
            }
        ]
    }

});

MainNavMaintenances.js :

Ext.define('Kone.view.MainNavMaintenances', {
        extend: 'Ext.navigation.View',
        alias: 'widget.mainnavmaintenances',

        requires: [
            'Kone.view.ListContainerMaintenances'
        ],

        config: {
            itemId: 'mynavigationview1',
            useTitleForBackButtonText: true,
            items: [
                {
                    xtype: 'listcontainermaintenances',
                    title: 'Maintenances'
                }
            ]
        }

    });

MainNavPetitsTravaux.js :

Ext.define('Kone.view.MainNavPetitstravaux', {
        extend: 'Ext.navigation.View',
        alias: 'widget.mainnavpetitstravaux',

        requires: [
            'Kone.view.ListContainerPetitsTravaux'
        ],

        config: {
            useTitleForBackButtonText: true,
            items: [
                {
                    xtype: 'listContainerPetitsTravaux',
                    title: 'Petits Travaux'
                }
            ]
        }

    });

And this is the Eclipse Android error I get :

01-02 14:18:50.015: D/CordovaActivity(8109): CordovaActivity.init()
01-02 14:18:50.020: D/CordovaWebView(8109): >>> loadUrl(file:///android_asset/www/index.html)
01-02 14:18:50.020: D/PluginManager(8109): init()
01-02 14:18:50.025: D/CordovaWebView(8109): >>> loadUrlNow()
01-02 14:18:50.025: D/Whitelist(8109): Unlimited access to network resources
01-02 14:18:50.030: I/CordovaLog(8109): Found start page location: index.html
01-02 14:18:50.030: I/CordovaLog(8109): Changing log level to DEBUG(3)
01-02 14:18:50.030: D/CordovaActivity(8109): Resuming the App
01-02 14:18:50.030: D/CordovaActivity(8109): CB-3064: The errorUrl is null
01-02 14:18:50.050: D/SoftKeyboardDetect(8109): Ignore this event
01-02 14:18:50.060: D/libEGL(8109): loaded /system/lib/egl/libEGL_mali.so
01-02 14:18:50.065: D/libEGL(8109): loaded /system/lib/egl/libGLESv1_CM_mali.so
01-02 14:18:50.070: D/libEGL(8109): loaded /system/lib/egl/libGLESv2_mali.so
01-02 14:18:50.075: E/(8109): Device driver API match
01-02 14:18:50.075: E/(8109): Device driver API version: 17
01-02 14:18:50.075: E/(8109): User space API version: 17 
01-02 14:18:50.075: E/(8109): mali: REVISION=Linux-r3p1-01rel1 BUILD_DATE=Tue Jul  2 15:06:24 KST 2013 
01-02 14:18:50.115: E/(8109): netstack: LIB_MGR - Error loading lib libdnshostprio.so
01-02 14:18:50.115: E/(8109): netstack: STAT_HUB - Failed to load plugin: libdnshostprio.so
01-02 14:18:50.115: E/(8109): netstack: LIB_MGR - Error loading lib spl_proc_plugin.so
01-02 14:18:50.115: E/(8109): netstack: STAT_HUB - Failed to load plugin: spl_proc_plugin.so
01-02 14:18:50.115: E/(8109): netstack: LIB_MGR - Error loading lib pp_proc_plugin.so
01-02 14:18:50.115: E/(8109): netstack: STAT_HUB - Failed to load plugin: pp_proc_plugin.so
01-02 14:18:50.115: E/(8109): netstack:  STAT_HUB - App com.capgemini.poc.kone isn't supported
01-02 14:18:50.115: D/(8109): dl error message dlopen failed: library "libtcpfinaggr.so" not found
01-02 14:18:50.115: D/Socket_Pool(8109): Failed to create TCP Fin Aggregation interface.
01-02 14:18:50.115: D/Socket_Pool(8109): netstack: CloseUnusedSockets is ON
01-02 14:18:50.115: D/Socket_Pool(8109): netstack: system net.statistics value: 0
01-02 14:18:50.115: D/Socket_Pool(8109): Failed to create TCP Fin Aggregation interface.
01-02 14:18:50.115: D/Socket_Pool(8109): netstack: CloseUnusedSockets is ON
01-02 14:18:50.115: D/Socket_Pool(8109): netstack: system net.statistics value: 0
01-02 14:18:50.120: D/(8109): external/chromium/net/http/http_getzip_factory.cc: Failed to construct GETzip manager, didn't find the library!
01-02 14:18:50.130: D/OpenGLRenderer(8109): Enabling debug mode 0
01-02 14:18:50.160: D/CordovaActivity(8109): onMessage(onPageStarted,file:///android_asset/www/index.html)
01-02 14:18:50.160: D/SoftKeyboardDetect(8109): Ignore this event
01-02 14:18:50.570: D/SoftKeyboardDetect(8109): Ignore this event
01-02 14:18:51.665: D/CordovaWebViewClient(8109): onPageFinished(file:///android_asset/www/index.html)
01-02 14:18:51.665: D/CordovaActivity(8109): onMessage(onPageFinished,file:///android_asset/www/index.html)
01-02 14:18:52.300: D/CordovaLog(8109): file:///android_asset/www/app.js: Line 1 : Uncaught TypeError: Cannot call method 'substring' of undefined
01-02 14:18:52.300: E/Web Console(8109): Uncaught TypeError: Cannot call method 'substring' of undefined at file:///android_asset/www/app.js:1
01-02 14:18:52.310: E/cutils-trace(8109): Error opening trace file: No such file or directory (2)
01-02 14:18:53.670: D/CordovaActivity(8109): onMessage(spinner,stop)
01-02 14:18:53.755: D/TilesManager(8109): Starting TG #0, 0x5905f970
01-02 14:18:53.755: D/TilesManager(8109): new EGLContext from framework: 57a892f8 
01-02 14:18:53.755: D/GLWebViewState(8109): Reinit shader
01-02 14:18:53.820: D/GLWebViewState(8109): Reinit transferQueue

I didn't post my controller because the application doesn't want to display the DOM also when disabling my data fetch..

It strange but when I copy my sencha application into an Android Web Server and I try to launch my application using Google Chrome Android, it works..

May be my sencha app generation using phonegap is done badly, I've done this in order to generate a sencha/phonegap app :

  • "cd" to the Sencha Touch root folder project and tape : sencha phonegap init com.mypackagename.myapplicationname MyApplicationName
    • Change build settings in phonegap.local.properties (this file should be in the Sencha Touch root folder) and set : phonegap.platform=android
    • In order to generate native Android application : sencha app build native
    • import it in Eclipse and change Assets/www/index.html : phonegap.js by cordova.js

Do I'm wrong ?

Was it helpful?

Solution

Solved it reinstalling Sencha CMD and getting the last version of Architect and using WAMP server instead of Sencha CMD Server..

Bad.

OTHER TIPS

Likely the fix was that the latest version of Architect appropriately included a base class that wasn't included before. In the browser the application was able to lazy load the dependency but as one would expect this does not work on the device.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top