简体   繁体   English

Sencha Touch 2轮播无法在Android设备上启动

[英]Sencha Touch 2 carousel doesn't start on Android device

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. 我使用Sencha Touch 2.3.X和Architect制作的移动应用程序不想在我的Android设备上启动(显示蓝色待处理的sencha屏幕),但它在我的桌面浏览器中运行良好。

Here is my app.js : 这是我的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 : 这是我的观点: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 : 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 : 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 : 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 : 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 : 这是我得到的Eclipse Android错误:

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.. 我没有发布控制器,因为禁用数据获取时应用程序也不想显示DOM。

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.. 奇怪的是,当我将sencha应用程序复制到Android Web Server并尝试使用Google Chrome Android启动应用程序时,它可以工作。

May be my sencha app generation using phonegap is done badly, I've done this in order to generate a sencha/phonegap app : 可能是我使用phonegap生成的sencha应用程序做得不好,我这样做是为了生成sencha / phonegap应用程序:

  • "cd" to the Sencha Touch root folder project and tape : sencha phonegap init com.mypackagename.myapplicationname MyApplicationName “ cd”到Sencha Touch根文件夹项目和磁带: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 更改phonegap.local.properties中的构建设置(此文件应位于Sencha Touch根文件夹中)并设置为:phonegap.platform = android
    • In order to generate native Android application : sencha app build native 为了生成原生Android应用程序:sencha app build native
    • import it in Eclipse and change Assets/www/index.html : phonegap.js by cordova.js 将其导入Eclipse并通过cordova.js更改Assets / www / index.html:phonegap.js

Do I'm wrong ? 我说错了吗

Solved it reinstalling Sencha CMD and getting the last version of Architect and using WAMP server instead of Sencha CMD Server.. 解决了它重新安装Sencha CMD并获取最新版本的Architect并使用WAMP服务器而不是Sencha CMD Server的问题。

Bad. 坏。

Likely the fix was that the latest version of Architect appropriately included a base class that wasn't included before. 可能的解决方法是,最新版本的Architect适当地包含了一个以前未包含的基类。 In the browser the application was able to lazy load the dependency but as one would expect this does not work on the device. 在浏览器中,该应用程序能够延迟加载依赖项,但是正如人们所希望的那样,这在设备上不起作用。

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

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