WResourceType: No package identifier when getting value for resource number 0x00000034

xiaoxiao2021-02-27  596

问题已经解决,之前写成了 tabUnReadMsg.setText(count);

setText方法里面应该传入string类型的字串,而不是传int型字串 public void updateTabUnReadMsg(int which,int count) { if(count <= 0){     return; } View v = tabsContainer.getChildAt(which); if (v instanceof TextView) {     Log.i("wangqx", "287 updateTabUnReadMsg"); } else if (v instanceof ViewGroup) {     mWhich = which;     Log.i("wangqx", "326 count="+count);     mCount = count;     Log.i("wangqx", "289 updateTabUnReadMsg");     TextView tabUnReadMsg = (TextView) v.findViewById(R.id.tv_unreadmsg);     Log.i("wangqx", "291 updateTabUnReadMsg");     tabUnReadMsg.setVisibility(View.VISIBLE);     Log.i("wangqx", "293 updateTabUnReadMsg");     tabUnReadMsg.setText(String.valueOf(count)); }

转载请注明原文地址: https://www.6miu.com/read-1324.html

最新回复(0)