2012-07-01 68 views
-1

任何人都可以幫我解剖這個錯誤日誌嗎?拋出它的類幾乎與在同一個程序中正常工作的另一個類相同。唯一的區別是,我已經添加了一個列表和正在傳遞參數的URL JSON請求找不到錯誤PHP MYSQL JSON ANDROID

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 [email protected] 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 [email protected] 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) 
+2

你能告訴我們從ListChannels.java包含線74的功能? – Rawkode

+0

編輯並添加第74行74行是JSONObject json = jParser.make ... – Andrew

+0

您是否無法啓動url_get_channels或jParser? – Rawkode

回答

1

那麼「android.view.WindowLeaked」異常呢? 這意味着您正在嘗試顯示來自「已關閉」活動的對話框。

希望這有助於 /亞龍