我试图这样做,on scrolling load more
但它根本不起作用我使用了以下代码:
错误:
04-29 15:55:22.682: E/AndroidRuntime(311): FATAL EXCEPTION: AsyncTask #2
04-29 15:55:22.682: E/AndroidRuntime(311): java.lang.RuntimeException: An error occured while executing doInBackground()
04-29 15:55:22.682: E/AndroidRuntime(311): at android.os.AsyncTask$3.done(AsyncTask.java:200)
04-29 15:55:22.682: E/AndroidRuntime(311): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
04-29 15:55:22.682: E/AndroidRuntime(311): at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
04-29 15:55:22.682: E/AndroidRuntime(311): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
04-29 15:55:22.682: E/AndroidRuntime(311): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
04-29 15:55:22.682: E/AndroidRuntime(311): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
04-29 15:55:22.682: E/AndroidRuntime(311): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
04-29 15:55:22.682: E/AndroidRuntime(311): at java.lang.Thread.run(Thread.java:1096)
04-29 15:55:22.682: E/AndroidRuntime(311): Caused by: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
04-29 15:55:22.682: E/AndroidRuntime(311): at android.os.Handler.<init>(Handler.java:121)
04-29 15:55:22.682: E/AndroidRuntime(311): at android.app.Dialog.<init>(Dialog.java:101)
04-29 15:55:22.682: E/AndroidRuntime(311): at android.app.AlertDialog.<init>(AlertDialog.java:63)
04-29 15:55:22.682: E/AndroidRuntime(311): at android.app.ProgressDialog.<init>(ProgressDialog.java:80)
04-29 15:55:22.682: E/AndroidRuntime(311): at android.app.ProgressDialog.<init>(ProgressDialog.java:76)
04-29 15:55:22.682: E/AndroidRuntime(311): at android.app.ProgressDialog.show(ProgressDialog.java:101)
04-29 15:55:22.682: E/AndroidRuntime(311): at android.app.ProgressDialog.show(ProgressDialog.java:90)
04-29 15:55:22.682: E/AndroidRuntime(311): at android.app.ProgressDialog.show(ProgressDialog.java:85)
04-29 15:55:22.682: E/AndroidRuntime(311): at com.example.know.FirstActivity.Callpagedetails(FirstActivity.java:176)
04-29 15:55:22.682: E/AndroidRuntime(311): at com.example.know.FirstActivity$LoadDataTask.doInBackground(FirstActivity.java:320)
04-29 15:55:22.682: E/AndroidRuntime(311): at com.example.know.FirstActivity$LoadDataTask.doInBackground(FirstActivity.java:1)
04-29 15:55:22.682: E/AndroidRuntime(311): at android.os.AsyncTask$2.call(AsyncTask.java:185)
04-29 15:55:22.682: E/AndroidRuntime(311): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
04-29 15:55:22.682: E/AndroidRuntime(311): ... 4 more
当我滚动时,我得到的页数正在增加,但我没有得到数据,有人可以帮助我解决这个问题吗?