有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

安卓 Volley更新1.2.0后的java问题

StringRequest request = new StringRequest(Request.Method.POST, URL_LOGIN, new Response.Listener<String>() {
                @Override
                public void onResponse(String response) {
                    progressDialog.dismiss();
                    if(response.equalsIgnoreCase("logged in successfully")){
                        Intent intent1 = new Intent(LoginActivity.this, Home.class);
                        startActivity(intent1);
                       Toast.makeText(LoginActivity.this,response,Toast.LENGTH_SHORT).show();
                    }
                    else{
                        Toast.makeText(LoginActivity.this,response, Toast.LENGTH_SHORT).show();
                    }
                }
            }, new Response.ErrorListener() {
                @Override
                public void onErrorResponse(VolleyError error) {
                    progressDialog.dismiss ();
                    Log.e("Volly Error", error.toString());


                }
            }
            ){
                @Override
                protected Map<String,String> getParams() throws AuthFailureError {
                    Map<String,String> params=new HashMap<String,String>();
                    params.put("email",str_email);
                    params.put("password",str_password);
                    return params;
                }
            };
            RequestQueue requestQueue = Volley.newRequestQueue(LoginActivity.this);
            requestQueue.add(request);
        }

下面是日志

com.安卓.volley.TimeoutError

在安卓 volley 1.2.0更新之后。在我的应用程序中登录和注册会自动停止工作。 在logcat中,它显示超时错误 谁能帮帮我吗


共 (0) 个答案