Toast报This Toast was not created

2016-11-01  本文已影响0人  我才是张雷

Toast toast =new Toast(mContext);
toast.setText("");//android 4.2及以上系统会报错
解决办法:
Toast toast = Toast.makeText(mContext, "", Toast.LENGTH_SHORT);
toast.setText("");

上一篇下一篇

猜你喜欢

热点阅读