找不到错误PHP MYSQL JSON ANDROID

时间:2012-07-01 00:42:37

标签: android mysql json logcat

任何人都可以帮我剖析这个错误日志吗?抛出它的类几乎与在同一程序中正常工作的另一个类相同。唯一的区别是我添加了一个List并将参数传递给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)

1 个答案:

答案 0 :(得分:1)

“android.view.WindowLeaked”异常怎么样? 这意味着您正试图通过“已关闭”活动显示对话框。

希望这会有所帮助 /亚龙