일단 client라는 클래스는 AsyncTask 관련 클래스 입니다.
처음 Activity에서 실행될 때
예를 들어
client c = new client();
Button button = findViewById..... 이렇게 선언하니까
surface is not valid라는 오류가 나왔습니다. 여러가지 시도해 보다가
Button button = findViewById....
client c = new client();
이렇게 순서를 바꾸니까 실행이 잘되길래 내가 스레드 관련으로 실수했구나라는 감은 오는데
정확히 무엇이 잘못됬는지 모르겠습니다.