java.lang.IllegalThreadStateException: Thread already started.

		runnable = new Runnable(){
			@Override
			public void run() {
				// TODO Auto-generated method stub
				Log.i("hanyu", "run");
				boolean flag = false;
				Message m = new Message();
				flag = Judge();
				if(flag){
					
					user = Connection.GetUserByname(name);
					m.what=1;
					myhandler.sendMessage(m);
				}else{
					m.what=0;
					myhandler.sendMessage(m);
				}
			}
		};
写个Runnable类对象,然后new Thread(runnable).start();开启新线程

你可能感兴趣的:(android)