21

如果在 ics 上运行(对于 2.3 运行良好),我会遇到这样的错误:

03-01 10:15:58.217: E/AndroidRuntime(844): FATAL EXCEPTION: AsyncTask #5
03-01 10:15:58.217: E/AndroidRuntime(844): java.lang.RuntimeException: An error occured while executing doInBackground()
03-01 10:15:58.217: E/AndroidRuntime(844):  at android.os.AsyncTask$3.done(AsyncTask.java:278)
03-01 10:15:58.217: E/AndroidRuntime(844):  at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
03-01 10:15:58.217: E/AndroidRuntime(844):  at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
03-01 10:15:58.217: E/AndroidRuntime(844):  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
03-01 10:15:58.217: E/AndroidRuntime(844):  at java.util.concurrent.FutureTask.run(FutureTask.java:137)
03-01 10:15:58.217: E/AndroidRuntime(844):  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
03-01 10:15:58.217: E/AndroidRuntime(844):  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
03-01 10:15:58.217: E/AndroidRuntime(844):  at java.lang.Thread.run(Thread.java:856)
03-01 10:15:58.217: E/AndroidRuntime(844): Caused by: java.lang.IllegalArgumentException: Illegal character in scheme at index 0:   http://localhost/android/data_janji.php?id_nasabah=40
03-01 10:15:58.217: E/AndroidRuntime(844):  at java.net.URI.create(URI.java:727)
03-01 10:15:58.217: E/AndroidRuntime(844):  at org.apache.http.client.methods.HttpGet.<init>(HttpGet.java:75)
03-01 10:15:58.217: E/AndroidRuntime(844):  at com.mpegadaian.JSONParser.makeHttpRequest(JSONParser.java:109)
03-01 10:15:58.217: E/AndroidRuntime(844):  at com.mpegadaian.DaftarJanjiActivity$LoadGadai.doInBackground(DaftarJanjiActivity.java:132)
03-01 10:15:58.217: E/AndroidRuntime(844):  at com.mpegadaian.DaftarJanjiActivity$LoadGadai.doInBackground(DaftarJanjiActivity.java:1)

我检查data_janji.php了我是否访问跨表单浏览器,结果很好:

{"data_janji":[{"nama_brg":"ANTING ANTING 10GR","id_janji":"9","id_gadai":"23","tgl_janji":"01-March-2013","pesan":"tebus bsk"}]}

如何解决这个问题?

4

1 回答 1

99

前面似乎有一些空白(空格)http:,请删除它们。

于 2013-03-01T06:34:26.910 回答