I have an Android app built in Eclipse which uses Cordova 2.0.0. When built and loaded onto the phone using the Eclipse debugger the app works fine, but when I set android:debuggable="false" in the AndroidManifest file the jQuery.ajax() POST fails. I get nothing to tell me the failure reason in the LogCat trace.
Here's the jQuery.ajax call:
Found the reason for this. My code was fine. The problem was with the SSL certificate of the webservice I was trying to call. Although my browser said it was ok, when I checked it with an SSL certificate checker (http://www.geocerts.com/ssl_checker for example) it showed me there was an issue with a certificate hierarchy. Fixing the certificate allowed my code to work.
I never had this problem with the iPhone version of the app so it seems that Android is more strict with it's SSL certificate checking (and it does no certificate checking when running in debug mode.)