我將活動A中的值傳遞給活動B,並將值存儲在EditText中,因爲我需要它可編輯目的是提供可編輯選項,一旦更新完成任何更新數據庫,當我編輯文本編輯文本框中輸入幾個字符它接受和應用程序運行,但是當我插入文本之間的空間例如:名稱[空間]初始然後運行應用程序崩潰。當我在EditText中添加空間時,它崩潰
我看到了日誌和它說違法的說法,我不知道什麼導致了問題..
距上一次活動的值都在這裏 RNAME = getIntent()。getExtras()檢索。的getString( 「名稱」); remail = getIntent()getExtras()的getString( 「電子郵件」)。; rphone = getIntent()。getExtras()。getString(「PHONE NO」); raddress = getIntent()getExtras()的getString( 「ADDRESS」)。。 rcity = getIntent()getExtras()的getString( 「城市」)。。 rcityloc = getIntent()getExtras()的getString( 「CITYLOCATION」)。。 rqual = getIntent()getExtras()的getString( 「資格」)。; rgender = getIntent()getExtras()的getString( 「性別」)。;
上述接收到的值被存儲在編輯文本框如下 ENAME =(的EditText)findViewById(R.id.namebox); ename.setText(RNAME,TextView.BufferType.EDITABLE);
eemail =(EditText)findViewById(R.id.emailbox); eemail.setText(remail,TextView.BufferType.NORMAL);
ephone=(EditText)findViewById(R.id.phonebox);
ephone.setText(rphone,TextView.BufferType.EDITABLE);
eaddress=(EditText)findViewById(R.id.addressbox);
eaddress.setText(raddress,TextView.BufferType.EDITABLE);
ecity=(EditText)findViewById(R.id.citybox);
ecity.setText(rcity,TextView.BufferType.EDITABLE);
ecityloc=(EditText)findViewById(R.id.citylocbox);
ecityloc.setText(rcityloc,TextView.BufferType.EDITABLE);
equal=(EditText)findViewById(R.id.qualbox);
equal.setText(rqual,TextView.BufferType.EDITABLE);
egender=(EditText)findViewById(R.id.genderbox);
gender.setText(rgender,TextView.BufferType.EDITABLE);
3.編輯如果存在的話完成並且被髮送到服務器以下面的代碼 編輯文本值被轉換成字符串,然後發送到服務器
HttpPost httppost = new HttpPost(UrlPath.Upath+"User_profile_update?sid=" + sid + "&name=" +sname+ "&phone=" + sphone + "&address=" + saddress + "&city=" + scity + "&city_location=" + scityloc + "&qualification=" +squal + "&gender=" +sgender);
- 日誌輸出
致命異常:主要
java.lan g.IllegalArgumentException:在查詢非法性格特徵在
並顯示
POST方法網址上面提到的3
可以發佈一些相關的代碼以及實際的日誌堆棧跟蹤嗎? – dumbfingers
請發佈您的代碼和堆棧跟蹤! –
這個問題的標題不是很好。 – Optox