-2
我很累,我不知道如何修復我的應用程序..我的問題是,每次我註冊並填寫edittext,直到點擊按鈕「註冊」我的應用程序forceclose,但數據輸入MySQL的.. 此消息Android登錄註冊Mysql
致命異常:主要 java.lang.NumberFormatException:無效INT: 「」
,這我的代碼:
private static final String REGISTER_REQUEST_URL = "";
private Map<String, String> params;
public RegisterRequest(String name, String username, String password, int age, String city, String email, int no, Response.Listener<String> listener){
super(Method.POST, REGISTER_REQUEST_URL, listener, null);
params = new HashMap<>();
params.put("name", name);
params.put("username", username);
params.put("password", password);
params.put("age", age + "");
params.put("city", city);
params.put("email", email);
params.put("no", no + "");
}
@Override
public Map<String, String> getParams(){
return params;
}
}
在字符串中轉換你的年齡和no – AbhayBohra
很顯然,這個代碼中的excletion **不是**,但是你在哪裏將String轉換爲int。 **請學習一些關於閱讀堆棧跟蹤的基礎知識** – Selvin