1. #1
    Sencha Premium Member
    Join Date
    Apr 2012
    Posts
    20
    Vote Rating
    0
    SergioPrado is on a distinguished road

      0  

    Default Unanswered: Android Sencha+PhoneGap app won't fully load/render

    Unanswered: Android Sencha+PhoneGap app won't fully load/render


    My PhoneGap+Sencha Touch 2.1 Android app will not fully load; whenever I launch it, I get the splash screen, then the index.html flashing dots, and then only the first image in the actual app (app.js) loads with the rest of the screen being white.

    This happens on my Samsung Galaxy (Android 2.2), Kyocera Rise (Android 4.2), and Droid emulator (Android 4.2). The app runs through the entire app.js file (based on alerts that I've placed throughout the javascript file), but nothing is actually rendered. The identical app package works just fine on iOS, on the web, AND on Android via PhoneGap Build. It does not work on PhoneGap Android on PC *or* Mac, I've tried both.

    I remade the entire app from scratch (via the PhoneGap "Getting Started" instructions), running the app every step along the way. Also tried both PhoneGap 1.8.0 and 2.2.0. Still didn't get it to work. What I did find is something weird: it only happens with Sencha Touch. If I just remove the reference to the Sencha Touch javascript file I don't encounter any errors and can render whatever I want, as long as it's markup in the index.html file. At this point I think there may be something wrong with the Sencha interacting with PhoneGap Android...but I really don't know.

    I've Googled/StackOverflow'd this issue (including the stat::init error below) extensively, and can't find a solution that works for my situation. Any help would be met with my undying gratitude, I am completely stumped. I've spent a week on this problem and I have no clue.

    EDIT: I've tried redownloading the Sencha Touch SDK. Then used that version of the SDK to build a new app, copy-pasted the app.js and views js files from the old app. Then rebuilt the app and used the new app.js to run the Android app. Still didn't work.

    EDIT 2: The base Sencha app appears to work. LogCat still gives the stat::init error that I see in the other apps, so that may not be the relevant error. I *guess* there's something wrong in the way that my app is written, which is still confusing since it works in literally every other possible version outside of PhoneGap Android. Still digging, any tips would be extremely appreciated.

    This is what LogCat produces during the app launch/failure. The stat::init error at the end seems like it probably is the issue, but it doesn't show up until well after the one image on the app renders.

    12-22 01:37:17.435: D/DroidGap(31402): onMessage(networkconnection,none)

    12-22 01:37:17.485: D/DroidGap(31402): onMessage(spinner,stop)

    12-22 01:37:17.505: D/DroidGap(31402): onMessage(splashscreen,hide)

    12-22 01:37:17.705: D/memalloc(31402): /dev/pmem: Mapped buffer
    base:0x51e90000 size:1249280 offset:634880 fd:87

    12-22 01:37:19.397: D/DroidGap(31402): onMessage(spinner,stop)

    12-22 01:37:21.269: V/WebRequest(31402): WebRequest::WebRequest, setPriority = 1

    12-22 01:37:37.915: D/DroidGap(31402): Paused the application!

    12-22 01:37:37.915: D/CordovaWebView(31402): Handle the pause

    12-22 01:37:38.085: W/IInputConnectionWrapper(31402): getExtractedText
    on inactive InputConnection

    12-22 01:37:38.145: W/IInputConnectionWrapper(31402): getExtractedText
    on inactive InputConnection

    12-22 01:37:39.406: D/DroidGap(31402): Resuming the App

    12-22 01:38:36.082: D/DroidGap(31402): Paused the application!

    12-22 01:38:36.142: D/CordovaWebView(31402): Handle the pause

    12-22 01:38:36.242: W/IInputConnectionWrapper(31402): getExtractedText
    on inactive InputConnection

    12-22 01:38:36.282: W/IInputConnectionWrapper(31402): getExtractedText
    on inactive InputConnection

    12-22 01:39:21.956: V/chromium(31402):
    external/chromium/net/disk_cache/hostres_plugin_bridge.cc:52:
    [1222/013921:INFO:hostres_plugin_bridge.cc(52)]
    StatHubCreateHostResPlugin initializing...

    12-22 01:39:21.956: V/chromium(31402):
    external/chromium/net/disk_cache/hostres_plugin_bridge.cc:57:
    [1222/013921:INFO:hostres_plugin_bridge.cc(57)]
    StatHubCreateHostResPlugin lib loaded

    12-22 01:39:21.956: V/chromium(31402):
    external/chromium/net/disk_cache/hostres_plugin_bridge.cc:63:
    [1222/013921:INFO:hostres_plugin_bridge.cc(63)]
    StatHubCreateHostResPlugin plugin connected

    12-22 01:39:21.956: V/chromium(31402):
    external/chromium/net/http/http_cache.cc:1167:
    [1222/013921:INFO:http_cache.cc(1167)] HttpCache::OnBackendCreated
    HostStat created

    12-22 01:39:21.966: E/chromium(31402):
    external/chromium/net/disk_cache/stat_hub.cc:190:
    [1222/013921:ERRORtat_hub.cc(190)] StatHub::Init - App
    com.BodBot.www isn't supported.

    12-22 01:39:21.966: E/chromium(31402):
    external/chromium/net/disk_cache/stat_hub.cc:190:
    [1222/013921:ERRORtat_hub.cc(190)] StatHub::Init - App
    com.BodBot.www isn't supported.
    Last edited by SergioPrado; 22 Dec 2012 at 3:49 PM. Reason: Tried reinstalling Sencha SDK, no success

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,327
    Answers
    3540
    Vote Rating
    850
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    So the launch method in Ext.application fires?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha Premium Member
    Join Date
    Apr 2012
    Posts
    20
    Vote Rating
    0
    SergioPrado is on a distinguished road

      0  

    Default


    Thanks for the response, Mitchell, especially right in the midst of the holiday season.

    After extensive digging, I discovered that app.css wasn't getting replaced for some reason when I was bringing over the app package. Since I had upgrade from 2.0 to 2.1, the 2.0 app.css file was apparently not working with the 2.1 code. Ended up deleting app.css and then replaced it, all is good.

Thread Participants: 1

Tags for this Thread