当前位置: 代码迷 >> PB >> 使用ClipboardManager遇到Can't create handler inside thread that has not called Looper.prepare()
  详细解决方案

使用ClipboardManager遇到Can't create handler inside thread that has not called Looper.prepare()

热度:303   发布时间:2016-04-29 05:30:35.0
使用ClipboardManager碰到Can't create handler inside thread that has not called Looper.prepare()

直接放上我的代码,希望能给碰到同样问题的朋友提供帮助

	    Runnable runnable = new Runnable() {	        public void run() {			   ClipboardManager clipboard =  (ClipboardManager)GameUtil.getIntance().getContext().getSystemService(Context.CLIPBOARD_SERVICE);		           clipboard.setText(content); 	        }		};		GameUtil.getIntance().getGameActiviti().runOnUiThread(runnable);


  相关解决方案