Android-PickerView 编译时验证失败!打正式包报错!需要混淆吗?报错信息

ldxq2e6h  于 5个月前  发布在  Android
关注(0)|答案(6)|浏览(82)

java.lang.VerifyError: Rejecting class com.bigkoo.pickerview.c.b because it failed compile-time verification (declaration of 'com.bigkoo.pickerview.c.b' appears in /data/app/com.xxx-1/base.apk)
at com.bigkoo.pickerview.a.b.build(Unknown Source)

xmjla07d

xmjla07d1#

引入的compile 'com.contrarywind:Android-PickerView:4.1.6',,,没有引入library

t5fffqht

t5fffqht2#

debug模式下不报错,打正式包崩溃

nxagd54h

nxagd54h4#

@xuxh6 建议可以先查找mapping 文件com.bigkoo.pickerview.a.b.build 对应的类是什么。看是否配置错混淆。

o2g1uqev

o2g1uqev5#

private void initDatePicker() {

Calendar selectedDate = Calendar.getInstance();//系统当前时间
    Calendar startDate = Calendar.getInstance();
    startDate.set(1900, 6, 6);//月份是按照0~11代表1月到12月
    Calendar endDate = Calendar.getInstance();
    endDate.set(2069, 6, 6);//月份是按照0~11代表1月到12月
    //时间选择器 ,自定义布局
    pvDateTime = new TimePickerBuilder(this, new OnTimeSelectListener() {
        @Override
        public void onTimeSelect(Date date, View v) {//选中事件回调
            String time = getTime(date);
            tvBirthday.setText(time);
            mPresenter.setUserBirthday(time);
        }
    })
            .setDate(selectedDate)
            .setRangDate(startDate, endDate)
            .setLayoutRes(R.layout.pickerview_custom_lunar, new CustomListener() {

                @Override
                public void customLayout(final View v) {
                    final TextView tvSubmit = (TextView) v.findViewById(R.id.tv_finish);
                    TextView ivCancel = (TextView) v.findViewById(R.id.iv_cancel);
                    tvSubmit.setOnClickListener(new View.OnClickListener() {
                        @Override
                        public void onClick(View v) {
                            pvDateTime.returnData();
                            pvDateTime.dismiss();
                        }
                    });
                    ivCancel.setOnClickListener(new View.OnClickListener() {
                        @Override
                        public void onClick(View v) {
                            pvDateTime.dismiss();
                        }
                    });

                }

            })
            .setType(new boolean[]{true, true, true, false, false, false})
            .isCenterLabel(false) //是否只显示中间选中项的label文字,false则每项item全部都带有label。
            .setDividerColor(Color.rgb(238, 238, 238))
            .build();
}

.build()报错 ,暂时没有解决办法

wxclj1h5

wxclj1h56#

@xuxh6 可以尝试keep 住 这几个类看是否有效。

相关问题