지금 현재 상태는 구문에는 에러가 없어서, 디버깅시에 에러가 사진과 같이 많이 뜨는 상태입니다. 디버깅이나 실행을 눌러도 에뮬에서 바로 실행도 안되는 상태이구요. 이 에러가 어디부분인지, 무슨 에러인지... 찾아보려했는 데, 검색에는 이렇게 안 뜨는 거도 있고, 떠도 설명이 없어서 이렇게 문의 드립니다. 소스는 아래에 첨부 했습니다... 도와주세요 ㅠ.. 파일로는 전체 소스랑 에러상태 png이구요. 일반 구문은 여기에다가도 추가하겠습니다. 많은도움 부탁드립니다 ㅠㅠ

 

소스==============================================================================================

 

package net.npaka.echoserver;

 

import android.app.*;
import android.content.*;
import android.os.*;
import android.view.*;
import android.widget.*;

import java.io.*;
import java.net.*;
import java.util.*;
import android.util.*;


public class Echoserver extends Activity implements View.OnClickListener{
 
 public String getLocalIpAddress() {
  try {
   for (Enumeration<NetworkInterface> en = NetworkInterface.getNetworkInterfaces(); en.hasMoreElements();) {
    NetworkInterface intf = en.nextElement();
    for (Enumeration<InetAddress> enumIpAddr = intf.getInetAddresses(); enumIpAddr.hasMoreElements();) {
     InetAddress inetAddress = enumIpAddr.nextElement();
     if (!inetAddress.isLoopbackAddress()) {
      return inetAddress.getHostAddress().toString();
     }
    }
   }
  } catch (SocketException ex) {
   Log.e("address", ex.toString());
  }
  return null;
 }

 public final String IP = "192.168.0.130";
 public final String PORT = "19090";
 public Echoserver current;
 public EditText edit1,edit2,edit3,edit4;
 public EditText edit5,edit6;
 public Button btn;
 
 public Socket socket;
 public InputStream in;
 public OutputStream out;


 public final Handler handler=new Handler();
 public String txtReceive;
 public String txtReceive2;

 
 
 
  @Override
    public void onCreate(Bundle savedInstanceState) {
   (new Thread(){public void run() {
    try {
     connect(IP,PORT);
    } catch (Exception e) {
    }
   }

   private void connect(String IP, String PORT) {
   
    
   }}).start();
  
  super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        current=this;
      
        edit1 = (EditText)findViewById(R.id.edit1);
        edit2 = (EditText)findViewById(R.id.edit2);
        edit3 = (EditText)findViewById(R.id.edit3);
        edit4 = (EditText)findViewById(R.id.edit4);
        edit5 = (EditText)findViewById(R.id.edit5);
        edit6 = (EditText)findViewById(R.id.edit6);
        btn = (Button)findViewById(R.id.btn);
  btn.setOnClickListener(this);
  
  edit3.setText(edit3.getText().toString()+getLocalIpAddress());
  
  }
   
 public void connect(String IP,int PORT) {
  int size;
  txtReceive="";
  txtReceive2="";
  byte[] w=new byte[1024];
  byte[] t=new byte[1024];
  try {
   socket=new Socket("192.168.0.130",PORT);
   in =socket.getInputStream();
   out=socket.getOutputStream();
   Log.d("EchoServer","connect");
  
   while (socket!=null && socket.isConnected()) {
    size=in.read(w);
    if (size<=0) continue;
    txtReceive=new String(w,0,size,"UTF-8");
    txtReceive2=new String(t,0,size,"UTF-8");
    handler.post(new Runnable(){
     public void run() {
      edit5.setText(
       edit5.getText());
      edit6.setText(
        edit6.getText());
     }
    });
   
   }
  } catch (Exception e) {
   handler.post(new Runnable(){
    public void run() {
     Echoserver.showDialog(current,"","통신 에러입니다 .");
    }
   });
  }
 }
 public void onClick(View v) {
  
  
  if (v.getId() == R.id.btn) {
  
   try {
   
    if (socket!=null && socket.isConnected()) {
    
     byte[] a=edit1.getText().toString().getBytes("UTF8");
     byte[] b=edit2.getText().toString().getBytes("UTF8");
     byte[] c=edit3.getText().toString().getBytes("UTF8");
     byte[] d=edit4.getText().toString().getBytes("UTF8");
     out.write(a);
     out.write(b);
     out.write(c);
     out.write(d);
     out.flush();
     out.flush();
     out.flush();
     out.flush();
     edit1.setText("",TextView.BufferType.NORMAL);
     edit2.setText("",TextView.BufferType.NORMAL);
     edit3.setText("",TextView.BufferType.NORMAL);
     edit4.setText("",TextView.BufferType.NORMAL);
    }
  } catch (Exception e) {
   handler.post(new Runnable(){
    public void run() {
     Echoserver.showDialog(current,"","통신 에러입니다 .");
    }
   });
  }
 }
}

 
 public static void showDialog(final Activity activity,String title,String text) {
  AlertDialog.Builder ad=new AlertDialog.Builder(activity);
  ad.setTitle(title);
  ad.setMessage(text);
  ad.setPositiveButton("OK",new DialogInterface.OnClickListener() {
   public void onClick(DialogInterface dialog,int whichButton) {
    activity.setResult(Activity.RESULT_OK);
   }
  });
  ad.create();
  ad.show();
 }
}