Using Android to submit to a Google Spreadsheet Form

后端 未结 5 1075
情歌与酒
情歌与酒 2020-11-29 03:05

First time asking a question here. Usually I can find my answer without having to ask, but this time I\'m stuck and can\'t figure out what I\'m missing.

I\'m just tr

5条回答
  •  南笙
    南笙 (楼主)
    2020-11-29 03:53

    You probably are not seing errors because you are printing exceptions in the wrong way.
    You are using e.printStackTrace(); which does not appear in DDMS/Logcat.

    You should use instead
    Log.e("YOUR_TAG, "An error has occurred", e);

    which will log your error in DDMS/Logcat. You should see the stacktrace of the exception, and it will help you understand what's wrong.

    EDIT: Have you checked what is returned in client.execute(post); ?
    You should check what is being returned in the POST response by doing:

    HttpResponse httpResponse = client.execute(post);
    

    You can also run the application in debug mode and check where it is crashing / stopping

提交回复
热议问题