Error while executing: am startservice com.dyh.drivingschool/com.android.tools.fd.runtime.InstantRunService
Starting service: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.dyh.drivingschool/com.android.tools.fd.runtime.InstantRunService launchParam=MultiScreenLaunchParams { mDisplayId=0 mFlags=0 } }
Error: Not found; no service started.
项目 APK 冲突,卸载模拟器或者手机上的APK文件或直接卸载到App。再次运行就好了,或者clean,Rebuild一下。
---------------------------------------------------------------------------------------------------------------------------------------------------------------
今天在在小米手机 Redmi3 上和VIVO手机上获取后台数据时候报400异常,在三星和华为手机就正常。
具体原因还不知道。就是因为在接口中有中文字段,所以就报错,在获取到接口进行请求时进行转码就好了,
try {
title = URLEncoder.encode(title, "UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
通过URLEncoder方法进行编码转换。
---------------------------------------------------------------------------------------------------------------------------------------------------------------
public void convert(final int position, View convertView, final BusinessOrderMyBean.DataEntity.PageEntity dataItem) { TextView tvBusinessMoney = convertView.findViewById(R.id.tv_business_Money);//价格 TextView tvBusinessTime = convertView.findViewById(R.id.tv_business_time);//时间 ImageView ivTypeWaitPayment = convertView.findViewById(R.id.iv_type_wait_payment);//待投放图片 TextView tvBusinessMode = convertView.findViewById(R.id.tv_business_mode);//投放方式 TextView tvBusinessDay = convertView.findViewById(R.id.tv_business_day);//总天数 TextView tvEnterResult = convertView.findViewById(R.id.tv_enter_result);//审核结果 RelativeLayout relatAdvertiseDetails = convertView.findViewById(R.id.relat_advertise_details);//广告详情 LinearLayout relatItemrelatDetails = convertView.findViewById(R.id.relat_item_relat_details);//条目内容详情 View view2 = convertView.findViewById(R.id.view_2);//条目内容详情 tvBusinessDay.setText(dataItem.getPutPeriod() + "天");//总天数 tvBusinessTime.setText(dataItem.getCreateTime()); //订单类型 :10 - 置顶 20 - 常规 if (dataItem.getOrderType().equals("10")) { tvBusinessMode.setText("置顶投放"); } else if (dataItem.getOrderType().equals("20")) { tvBusinessMode.setText("常规投放"); } //10 – 待付款 if (dataItem.getOrderStatus().equals("10")) { tvBusinessMoney.setText("应付款:¥" + MathUtil.round(dataItem.getAmount(), 2)); ivTypeWaitPayment.setImageResource(R.drawable.img_business_wait_payment); tvEnterResult.setVisibility(View.GONE); view2.setVisibility(View.GONE); } //20 - 30 待投放 else if (dataItem.getOrderStatus().equals("20") | dataItem.getOrderStatus().equals("30")) { tvBusinessMoney.setText("已付款:¥" + MathUtil.round(dataItem.getAmount(), 2)); ivTypeWaitPayment.setImageResource(R.drawable.img_business_wait_putin); //10- 审核中 20- 审核通过 30 - 审核失败 if (dataItem.getApproVal().equals("10")) { tvEnterResult.setVisibility(View.VISIBLE); tvEnterResult.setText("审核中"); } else if (dataItem.getApproVal().equals("20")) { if (dataItem.getRemainDays() == 0) { tvEnterResult.setVisibility(View.VISIBLE); tvEnterResult.setText("审核通过,即将投放"); } else { tvEnterResult.setVisibility(View.VISIBLE); tvEnterResult.setText("审核通过,距离投放还有" + dataItem.getRemainDays() + "天"); } } else if (dataItem.getApproVal().equals("30")) { tvEnterResult.setVisibility(View.VISIBLE); tvEnterResult.setText("审核失败"); } } //40 - 投放中 else if (dataItem.getOrderStatus().equals("40")) { tvBusinessMoney.setText("已付款:¥" + MathUtil.round(dataItem.getAmount(), 2)); ivTypeWaitPayment.setImageResource(R.drawable.img_business_put_in); tvEnterResult.setVisibility(View.VISIBLE); tvEnterResult.setText("曝光量:" + dataItem.getAllHits()); } //50 - 已完成 else if (dataItem.getOrderStatus().equals("50")) { tvBusinessMoney.setText("已付款:¥" + MathUtil.round(dataItem.getAmount(), 2)); ivTypeWaitPayment.setImageResource(R.drawable.img_business_complete); tvEnterResult.setVisibility(View.VISIBLE); tvEnterResult.setText("曝光量:" + dataItem.getAllHits());
在listview列表中:在item事件中内容显示不全,因为在其中一个item中调用了隐藏方法tvEnterResult.setVisibility(View.GONE);
但是这个判断在一个判断语句中,应该是不影响其他数据的,在实际的操作中,当数据为一屏的时候,某个数据就出现了缺失,找了半天没发现问题的所在,后来给其他的判断语句中加入显示 tvEnterResult.setVisibility(View.VISIBLE);然后这个问题就解决了,很尴尬。
---------------------------------------------------------------------------------------------------------------------------------------------------------------