谁能帮我剖析这个错误日志?抛出这个的类几乎与在同一程序中运行良好的另一个类相同。唯一的区别是我添加了一个列表并将参数传递给 json 请求的 url
protected String doInBackground(String... args) {
// Building Parameters
List<NameValuePair> params = new ArrayList<NameValuePair>();
// getting JSON string from URL
//params.add(new BasicNameValuePair("category","cat"));
第 74 行: JSONObject json = jParser.makeHttpRequest(url_get_channels, "GET", params);
// Check your log cat for JSON reponse
Log.d("All Products: ", json.toString());
07-01 00:17:21.573: D/dalvikvm(1009): GC_FOR_MALLOC freed 2585 objects / 167744 bytes in 78ms
07-01 00:17:28.133: W/dalvikvm(1009): threadid=9: thread exiting with uncaught exception (group=0x4001d800)
07-01 00:17:28.253: E/AndroidRuntime(1009): FATAL EXCEPTION: AsyncTask #2
07-01 00:17:28.253: E/AndroidRuntime(1009): java.lang.RuntimeException: An error occured while executing doInBackground()
07-01 00:17:28.253: E/AndroidRuntime(1009): at android.os.AsyncTask$3.done(AsyncTask.java:200)
07-01 00:17:28.253: E/AndroidRuntime(1009): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
07-01 00:17:28.253: E/AndroidRuntime(1009): at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
07-01 00:17:28.253: E/AndroidRuntime(1009): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
07-01 00:17:28.253: E/AndroidRuntime(1009): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
07-01 00:17:28.253: E/AndroidRuntime(1009): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
07-01 00:17:28.253: E/AndroidRuntime(1009): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
07-01 00:17:28.253: E/AndroidRuntime(1009): at java.lang.Thread.run(Thread.java:1096)
07-01 00:17:28.253: E/AndroidRuntime(1009): Caused by: java.lang.NullPointerException
07-01 00:17:28.253: E/AndroidRuntime(1009): at com.example.video.unlimited.ListChannels$LoadAllChannels.doInBackground(ListChannels.java:74)
07-01 00:17:28.253: E/AndroidRuntime(1009): at com.example.video.unlimited.ListChannels$LoadAllChannels.doInBackground(ListChannels.java:1)
07-01 00:17:28.253: E/AndroidRuntime(1009): at android.os.AsyncTask$2.call(AsyncTask.java:185)
07-01 00:17:28.253: E/AndroidRuntime(1009): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
07-01 00:17:28.253: E/AndroidRuntime(1009): ... 4 more
07-01 00:17:29.762: E/WindowManager(1009): Activity com.example.video.unlimited.ListChannels has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@44ef2968 that was originally added here
07-01 00:17:29.762: E/WindowManager(1009): android.view.WindowLeaked: Activity com.example.video.unlimited.ListChannels has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@44ef2968 that was originally added here
07-01 00:17:29.762: E/WindowManager(1009): at android.view.ViewRoot.<init>(ViewRoot.java:247)
07-01 00:17:29.762: E/WindowManager(1009): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:148)
07-01 00:17:29.762: E/WindowManager(1009): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
07-01 00:17:29.762: E/WindowManager(1009): at android.view.Window$LocalWindowManager.addView(Window.java:424)
07-01 00:17:29.762: E/WindowManager(1009): at android.app.Dialog.show(Dialog.java:241)
07-01 00:17:29.762: E/WindowManager(1009): at com.example.video.unlimited.ListChannels$LoadAllChannels.onPreExecute(ListChannels.java:63)
07-01 00:17:29.762: E/WindowManager(1009): at android.os.AsyncTask.execute(AsyncTask.java:391)
07-01 00:17:29.762: E/WindowManager(1009): at com.example.video.unlimited.ListChannels.onCreate(ListChannels.java:45)
07-01 00:17:29.762: E/WindowManager(1009): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
07-01 00:17:29.762: E/WindowManager(1009): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
07-01 00:17:29.762: E/WindowManager(1009): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
07-01 00:17:29.762: E/WindowManager(1009): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
07-01 00:17:29.762: E/WindowManager(1009): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
07-01 00:17:29.762: E/WindowManager(1009): at android.os.Handler.dispatchMessage(Handler.java:99)
07-01 00:17:29.762: E/WindowManager(1009): at android.os.Looper.loop(Looper.java:123)
07-01 00:17:29.762: E/WindowManager(1009): at android.app.ActivityThread.main(ActivityThread.java:4627)
07-01 00:17:29.762: E/WindowManager(1009): at java.lang.reflect.Method.invokeNative(Native Method)
07-01 00:17:29.762: E/WindowManager(1009): at java.lang.reflect.Method.invoke(Method.java:521)
07-01 00:17:29.762: E/WindowManager(1009): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
07-01 00:17:29.762: E/WindowManager(1009): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
07-01 00:17:29.762: E/WindowManager(1009): at dalvik.system.NativeStart.main(Native Method)