Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

App works in iPhone simulator, crashes on Android simulator

I have the Kitchen Sink app installed and running fine under the iPhone simulator, iPhone device, and the Android simulator.

I've written a small test app that works great under the iPhone simulator and on the iPhone device. The app crashes when run on the Android simulator with "The application xxxx has stopped unexpectedly. Please try again."

How or where do I look to figure out what things are not supported on Android? I've looked for "Platform.name ==" in the Kitchen sink app, and that's a little helpful, but it would be nice to have a list of things that work on iPhone and not Android and vice-verse. Does such a list exist?

Of not, are there easier ways of finding the offending code other than going through all the code line-by-line?

— asked March 11th 2010 by Mark Burggraf
  • debugging android port iphone
0 Comments

8 Answers

  • The best way to solve these problems, I have found, is to liberally place debug messages in the code, like this:

    Ti.API.info("Made it to point 001");

    Then just watch the output in Titanium Developer until you see the last successful message. That'll pinpoint the problem code.

    NOTE: Make sure when you launch the app from the Developer screen, you have the filter set to "Info".

    — answered March 16th 2010 by Mark Burggraf
    permalink
    0 Comments
  • If you set your log level to Trace, copy all of the output from the run, paste into a pastie we can help figure out if it's a platform specific problem or just something we haven't finished implementing yet.

    — answered March 11th 2010 by Don Thorp
    permalink
    0 Comments
  • I'm a little unclear about what you want. Do you want me to post the output here, or on the pastie.org site?

    — answered March 11th 2010 by Mark Burggraf
    permalink
    0 Comments
  • I am having the same issue, here is where the app is dying at:

    [TRACE] E/AndroidRuntime( 593): at ti.modules.titanium.network.TiHTTPClient$1.run(TiHTTPClient.java:739)
    [TRACE] E/AndroidRuntime( 593): at java.lang.Thread.run(Thread.java:1096)
    [TRACE] I/Process ( 55): Sending signal. PID: 593 SIG: 3
    [TRACE] I/dalvikvm( 593): threadid=7: reacting to signal 3
    [TRACE] E/dalvikvm( 593): Unable to open stack trace file '/data/anr/traces.txt': Permission denied
    [TRACE] D/dalvikvm( 108): GC freed 2243 objects / 130504 bytes in 345ms
    [TRACE] I/Process ( 593): Sending signal. PID: 593 SIG: 9
    [TRACE] I/WindowManager( 55): WIN DEATH: Window{43d371e8 com.jedunn.mobile/com.jedunn.mobile.JedmobileActivity paused=false}
    [TRACE] I/ActivityManager( 55): Process com.jedunn.mobile (pid 593) has died.
    [TRACE] I/UsageStats( 55): Unexpected resume of com.android.launcher while already resumed in com.jedunn.mobile
    [TRACE] W/InputManagerService( 55): Got RemoteException sending setActive(false) notification to pid 593 uid 10027

    — answered March 16th 2010 by Mark Stocks
    permalink
    0 Comments
  • I am having the same issue, here is where the app is dying at:

    [TRACE] E/AndroidRuntime( 593): at ti.modules.titanium.network.TiHTTPClient$1.run(TiHTTPClient.java:739)
    [TRACE] E/AndroidRuntime( 593): at java.lang.Thread.run(Thread.java:1096)
    [TRACE] I/Process ( 55): Sending signal. PID: 593 SIG: 3
    [TRACE] I/dalvikvm( 593): threadid=7: reacting to signal 3
    [TRACE] E/dalvikvm( 593): Unable to open stack trace file '/data/anr/traces.txt': Permission denied
    [TRACE] D/dalvikvm( 108): GC freed 2243 objects / 130504 bytes in 345ms
    [TRACE] I/Process ( 593): Sending signal. PID: 593 SIG: 9
    [TRACE] I/WindowManager( 55): WIN DEATH: Window{43d371e8 com.jedunn.mobile/com.jedunn.mobile.JedmobileActivity paused=false}
    [TRACE] I/ActivityManager( 55): Process com.jedunn.mobile (pid 593) has died.
    [TRACE] I/UsageStats( 55): Unexpected resume of com.android.launcher while already resumed in com.jedunn.mobile
    [TRACE] W/InputManagerService( 55): Got RemoteException sending setActive(false) notification to pid 593 uid 10027

    — answered March 16th 2010 by Mark Stocks
    permalink
    0 Comments
  • I have the same issue.
    I am building under OSX 10.5.8 and I used the latest source from github.
    Tested against other versions from github and it had the same issue.

    Crashes using emulator and a real Nexus One.

    <a href="http://pastie.org/873446">pastie</a>

    Sorry!

    The application KitchenSink
    (process com.nolanwright.
    kitchensink) has stopped
    unexpectedly. Please try again.

    Update

    Upgraded from OSX 10.5.8 to 10.6.2

    Still unable to run Kitchen Sink App (or any app) under Android emulator or real phone. iPhone emulator works fine.

    — answered March 17th 2010 by James McParlane
    permalink
    0 Comments
  • this is also happening to me.
    fresh install of snow leopard 10.6.3 , fresh install of titanium developer, mobile sdk, android sdk.

    after i updated the android.py file to the one that is on github, i was finally able to see the android tab in the "run emulator" section.
    creating a new, blank project and trying to test it in the android emulator opens the emulator and then opens the application and immediately a warning comes up saying "the application ___ has stopped unexpectedly. please try again."

    any help would be appreciated.

    — answered April 16th 2010 by danno watts
    permalink
    0 Comments
  • The reference documentation does indicate which namespaces are available on which platforms - if you look in the upper right corner, you will see that there are small android and iPhone icons for most namespaces. In some cases, there will be only one icon shown, indicating a platform specific feature.

    — answered June 8th 2010 by Kevin Whinnery
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.