你能幫忙嗎,為什么我在 logcat 中收到此錯誤?最近,自從我遷移到 SDK 28 后一切正常,但失敗了。但我不確定這是 SDK 28 的問題。付款正常(用戶收到付款,但 Intent 不起作用,在 Logcat 中我收到此錯誤)你能建議一下嗎?謝謝public void sendPayment(String type) { ProjectUtils.showProgressDialog(mContext, true, getResources().getString(R.string.please_wait)); new HttpsRequest(Consts.MAKE_PAYMENT_API, getParms(type), mContext).stringPost(TAG, new Helper() { @Override public void backResponse(boolean flag, String msg, JSONObject response) { ProjectUtils.pauseProgressDialog(); if (flag) { ProjectUtils.showToast(mContext, msg); Intent in = new Intent(mContext, WriteReview.class); in.putExtra(Consts.HISTORY_DTO, historyDTO); startActivity(in); finish(); } else { ProjectUtils.showToast(mContext, msg); } } }); } public Map<String, String> getParms(String type) { HashMap<String, String> params = new HashMap<>(); params.put(Consts.INVOICE_ID, historyDTO.getInvoice_id()); params.put(Consts.USER_ID, userDTO.getUser_id()); params.put(Consts.COUPON_CODE, coupon_code); params.put(Consts.FINAL_AMOUNT, final_amount); params.put(Consts.PAYMENT_STATUS, "1"); params.put(Consts.PAYMENT_TYPE, type); params.put(Consts.DISCOUNT_AMOUNT, discount_amount); Log.e("sendPaymentConfirm", params.toString()); return params; }更新:錯誤sendPaymentConfirm: {payment_type=1, final_amount=150, discount_amount=0, invoice_id=RCVG2QNWBHCP, payment_status=1, user_id=614, coupon_code=}PaymentProActivity: error body --->null error msg --->org.json.JSONException: Value <div of type java.lang.String cannot be converted to JSONObject
添加回答
舉報
0/150
提交
取消