这是我的代码:
public class MainActivity extends Activity {
private static final String LOGIN_URL = "http://some.com/login";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main_activity);
new asad().execute();
}
class asad extends AsyncTask<Void, Void, Void>{
@Override
protected Void doInBackground(Void... params) {
Document doc =null;
try {
doc = Jsoup.connect(LOGIN_URL).get();
} catch (IOException e) {
// TODO Auto-generated catch block
Log.d("DDD","failcha");
}
return null;
}
@Override
protected void onPostExecute(Void result) {
startActivity(new Intent(MainActivity.this, Second.class));
super.onPostExecute(result);
}
}
}
并exception
在19 line
:
为什么线程 17 停止了?
什么ThreadPoolExecutor.runWorker(ThreadPoolExecutor$Worker) line: 1094
意思?
DalvikVM[localhost:8600]
Thread [<1> main] (Running)
Thread [<10> Binder Thread #2] (Running)
Thread [<9> Binder Thread #1] (Running)
Daemon Thread [<8> FinalizerWatchdogDaemon] (Running)
Daemon Thread [<7> FinalizerDaemon] (Running)
Daemon Thread [<6> ReferenceQueueDaemon] (Running)
Thread [<14> CookieSyncManager] (Running)
Thread [<12> WebViewCoreThread] (Running)
Daemon Thread [<11> SCHTimer] (Running)
Thread [<15> AsyncTask #1] (Running)
Thread [<13> Binder Thread #3] (Running)
Thread [<16> Thread-6910] (Running)
Thread [<17> AsyncTask #2] (Suspended (exception RuntimeException))
<VM does not provide monitor information>
ThreadPoolExecutor.runWorker(ThreadPoolExecutor$Worker) line: 1094
ThreadPoolExecutor$Worker.run() line: 569
Thread.run() line: 856
Thread [<18> AsyncTask #3] (Running)
Logcat 的最后一行:
I/GATE(2586): <GATE-M>DEV_ACTION_COMPLETED</GATE-M>
我使用了 Jsoup 库