我正在制作这个应用程序,它有一个允许用户登录的活动,程序检查数据库中的信息,然后将用户发送到仪表板屏幕。它一直运行良好,但现在我遇到了一些奇怪的错误,我无法弄清楚它们来自哪里。
这是日志猫:
01-18 14:54:22.160: E/AndroidRuntime(2621): FATAL EXCEPTION: AsyncTask #5
01-18 14:54:22.160: E/AndroidRuntime(2621): java.lang.RuntimeException: An error occured while executing doInBackground()
01-18 14:54:22.160: E/AndroidRuntime(2621): at android.os.AsyncTask$3.done(AsyncTask.java:299)
01-18 14:54:22.160: E/AndroidRuntime(2621): at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352)
01-18 14:54:22.160: E/AndroidRuntime(2621): at java.util.concurrent.FutureTask.setException(FutureTask.java:219)
01-18 14:54:22.160: E/AndroidRuntime(2621): at java.util.concurrent.FutureTask.run(FutureTask.java:239)
01-18 14:54:22.160: E/AndroidRuntime(2621): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
01-18 14:54:22.160: E/AndroidRuntime(2621): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
01-18 14:54:22.160: E/AndroidRuntime(2621): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
01-18 14:54:22.160: E/AndroidRuntime(2621): at java.lang.Thread.run(Thread.java:856)
01-18 14:54:22.160: E/AndroidRuntime(2621): Caused by: java.lang.IllegalStateException: Target host must not be null, or set in parameters. scheme=null, host=null, path=192.168.0.2/android_login/
01-18 14:54:22.160: E/AndroidRuntime(2621): at org.apache.http.impl.client.DefaultRequestDirector.determineRoute(DefaultRequestDirector.java:591)
01-18 14:54:22.160: E/AndroidRuntime(2621): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:293)
01-18 14:54:22.160: E/AndroidRuntime(2621): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
01-18 14:54:22.160: E/AndroidRuntime(2621): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
01-18 14:54:22.160: E/AndroidRuntime(2621): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
01-18 14:54:22.160: E/AndroidRuntime(2621): at com.example.androidbasic12.library.JSONParser.getJSONFromUrl(JSONParser.java:42)
01-18 14:54:22.160: E/AndroidRuntime(2621): at com.example.androidbasic12.library.UserFunctions.loginUser(UserFunctions.java:40)
01-18 14:54:22.160: E/AndroidRuntime(2621): at com.example.androidbasic12.MainActivity$LoginTask.doInBackground(MainActivity.java:78)
01-18 14:54:22.160: E/AndroidRuntime(2621): at com.example.androidbasic12.MainActivity$LoginTask.doInBackground(MainActivity.java:1)
01-18 14:54:22.160: E/AndroidRuntime(2621): at android.os.AsyncTask$2.call(AsyncTask.java:287)
01-18 14:54:22.160: E/AndroidRuntime(2621): at java.util.concurrent.FutureTask.run(FutureTask.java:234)
01-18 14:54:22.160: E/AndroidRuntime(2621): ... 4 more
任何人都可以看到这里的问题是什么?