Android:Email: E/AbstractSyncService( 529): 每次都会发生java.lang.NullPointerException
我正在 Android 中进行主动同步。我每次都会收到“java.lang.NullPointerException”。
日志显示:
Uncaught exception in EasSyncService
java.lang.NullPointerException
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:453)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
at com.android.exchange.EasSyncService.sendHttpClientPost(EasSyncService.java:787)
at com.android.exchange.EasSyncService.sendPing(EasSyncService.java:721)
at com.android.exchange.EasSyncService.runPingLoop(EasSyncService.java:1093)
at com.android.exchange.EasSyncService.runAccountMailbox(EasSyncService.java:957)
at com.android.exchange.EasSyncService.run(EasSyncService.java:1460)
at java.lang.Thread.run(Thread.java:1096)
当我使用 POST 发送 http 请求时,在日志中注意到此错误。发送 ping 命令有时会出现上述错误。
我无法弄清楚为什么会发生此错误以及如何避免它。请任何人都可以给出上述问题的解决方案并解决同样的问题。
解决方案提前得到赞赏。
I am working on Active sync in Android. I get "java.lang.NullPointerException" every time.
Logs shows:
Uncaught exception in EasSyncService
java.lang.NullPointerException
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:453)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
at com.android.exchange.EasSyncService.sendHttpClientPost(EasSyncService.java:787)
at com.android.exchange.EasSyncService.sendPing(EasSyncService.java:721)
at com.android.exchange.EasSyncService.runPingLoop(EasSyncService.java:1093)
at com.android.exchange.EasSyncService.runAccountMailbox(EasSyncService.java:957)
at com.android.exchange.EasSyncService.run(EasSyncService.java:1460)
at java.lang.Thread.run(Thread.java:1096)
This error has been noticed in logs when I am sending http request using POST. Sending the ping command gives the above error some times.
I am not able to figure out why this error occurs and how it can be avoided . Kindly any one can give solution to above and solve the same .
Solution is appreciated well in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
回溯看起来类似于 http://code.google.com/p/ android/issues/detail?id=5255 。
The traceback looks similar to http://code.google.com/p/android/issues/detail?id=5255 .