android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thre

자세히 보기
10-22 19:16:39.231: E/RetryHandler.retryRequest(L:91)(5718): retry error, curr request is null
10-22 19:17:47.121: E/AndroidRuntime(5718): FATAL EXCEPTION: Thread-1087
10-22 19:17:47.121: E/AndroidRuntime(5718): Process: com.foxhis.activity, PID: 5718
10-22 19:17:47.121: E/AndroidRuntime(5718): android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
10-22 19:17:47.121: E/AndroidRuntime(5718): 	at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:6193)
10-22 19:17:47.121: E/AndroidRuntime(5718): 	at android.view.ViewRootImpl.requestLayout(ViewRootImpl.java:900)
10-22 19:17:47.121: E/AndroidRuntime(5718): 	at android.view.View.requestLayout(View.java:16431)
10-22 19:17:47.121: E/AndroidRuntime(5718): 	at android.view.View.requestLayout(View.java:16431)
10-22 19:17:47.121: E/AndroidRuntime(5718): 	at android.widget.RelativeLayout.requestLayout(RelativeLayout.java:352)
10-22 19:17:47.121: E/AndroidRuntime(5718): 	at android.view.View.requestLayout(View.java:16431)
10-22 19:17:47.121: E/AndroidRuntime(5718): 	at android.view.View.requestLayout(View.java:16431)
10-22 19:17:47.121: E/AndroidRuntime(5718): 	at android.view.View.requestLayout(View.java:16431)
10-22 19:17:47.121: E/AndroidRuntime(5718): 	at android.view.View.requestLayout(View.java:16431)
10-22 19:17:47.121: E/AndroidRuntime(5718): 	at android.widget.RelativeLayout.requestLayout(RelativeLayout.java:352)
10-22 19:17:47.121: E/AndroidRuntime(5718): 	at android.view.View.requestLayout(View.java:16431)
10-22 19:17:47.121: E/AndroidRuntime(5718): 	at android.view.View.requestLayout(View.java:16431)
10-22 19:17:47.121: E/AndroidRuntime(5718): 	at android.view.View.requestLayout(View.java:16431)
10-22 19:17:47.121: E/AndroidRuntime(5718): 	at android.widget.RelativeLayout.requestLayout(RelativeLayout.java:352)
10-22 19:17:47.121: E/AndroidRuntime(5718): 	at android.view.View.requestLayout(View.java:16431)
10-22 19:17:47.121: E/AndroidRuntime(5718): 	at android.widget.RelativeLayout.requestLayout(RelativeLayout.java:352)
10-22 19:17:47.121: E/AndroidRuntime(5718): 	at android.view.View.setFlags(View.java:8908)
10-22 19:17:47.121: E/AndroidRuntime(5718): 	at android.view.View.setVisibility(View.java:6036)
10-22 19:17:47.121: E/AndroidRuntime(5718): 	at com.foxhis.untils.ProcessResult.hideAlert(ProcessResult.java:69)
10-22 19:17:47.121: E/AndroidRuntime(5718): 	at com.foxhis.activity.fragment.GuestInfo_order_detailFragment$3.run(GuestInfo_order_detailFragment.java:296)

 
android 개발에 유사한 오류가 자주 발생합니다.
이유: View 컨트롤은 주 스레드에서만 작동합니다.다른 라인에서 처리하면 위의 오류를 보고합니다.
  eg:
new Thread(){
				public void run() {
					Message msgMessage = xHandler.obtainMessage(what);
					xHandler.sendMessage(msgMessage);
                                        testView.setVisibility(View.GONE);
				}
			}.start();

 
 
 

좋은 웹페이지 즐겨찾기