代码
OptionsPickerView pvOptions = new OptionsPickerView.Builder(getActivity(), new OptionsPickerView.OnOptionsSelectListener() {
@OverRide
public void onOptionsSelect(int options1, int option2, int options3 ,View v) {
//返回的分别是三个级别的选中位置
// String tx = options1Items.get(options1).getPickerViewText()
// + options2Items.get(options1).get(option2)
// + options3Items.get(options1).get(option2).get(options3).getPickerViewText();
// tvOptions.setText(tx);
}
}).build();
pvOptions.setPicker(mDayList,mtimeList);//一级选择器
pvOptions.show();
崩溃日志
java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List
12-15 16:45:08.222 14730-14730/? W/System.err: at com.bigkoo.pickerview.view.WheelOptions.setPicker(WheelOptions.java:72)
12-15 16:45:08.222 14730-14730/? W/System.err: at com.bigkoo.pickerview.OptionsPickerView.setPicker(OptionsPickerView.java:522)
12-15 16:45:08.222 14730-14730/? W/System.err: at com.bigkoo.pickerview.OptionsPickerView.setPicker(OptionsPickerView.java:515)
12-15 16:45:08.222 14730-14730/? W/System.err: at com.example.yixixinapp.ui.fragment.WashParticularsExpressFragment.onViewClicked(WashParticularsExpressFragment.java:178)
12-15 16:45:08.222 14730-14730/? W/System.err: at com.example.yixixinapp.ui.fragment.WashParticularsExpressFragment_ViewBinding$2.doClick(WashParticularsExpressFragment_ViewBinding.java:55)
1条答案
按热度按时间llmtgqce1#
java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List 数据类型错误。传入需要List类型的数组。