Titanium Community Questions & Answer Archive

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

image upload works in emulator but fails on device

Hi, I'm 99.99% done with my app :)! I compiled a final test version for my Droid running Android 2.2 and found that the following code gave me an error on my phone that it wasn't giving me in the emulator?


So, obviously this is paraphrased. The only thing really missing there are title and description textfields. Its a simple app, you select picture from gallery, enter title and description and submit it. This is the error I'm getting:

title: Runtime Error
location: [249,0] app://post.js
message: java.lang.NullPointerException

line 249 of post.js is


Any ideas?

— asked November 2nd 2010 by Andrew Scofield
  • android
  • httpclient
  • post
1 Comment
  • Image upload has stumped a lot of people also. Would you mind whittling your code down to the bare essentials to demonstrate a working image upload script, and then sharing (using gist for example).

    I will certainly help you resolve the issue, if I am able to first quickly paste your script into my environment.

    — commented November 5th 2010 by Paul Dowsett

2 Answers

  • try this:

    — answered November 2nd 2010 by Peter Griffin
  • Tried that, gave me same error.

    — answered November 5th 2010 by Andrew Scofield
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.