Java &引用;org.json.JSONObject“;“失踪”;Request.Method.GET";及;com.android.volley“;JsonObjectRequest参数似乎顺序错误
我试图使用“com.android.volley”模块的JSONObject请求对一些Json数据发出GET请求 android开发页面(谷歌自己的网站)显示如下设置:Java &引用;org.json.JSONObject“;“失踪”;Request.Method.GET";及;com.android.volley“;JsonObjectRequest参数似乎顺序错误,java,android,json,Java,Android,Json,我试图使用“com.android.volley”模块的JSONObject请求对一些Json数据发出GET请求 android开发页面(谷歌自己的网站)显示如下设置: JsonObjectRequest jsonObjectRequest = new JsonObjectRequest (Request.Method.GET, url, null, new Response.Listener<JSONObject>() { ... } ); 我的构建依赖项中还有实
JsonObjectRequest jsonObjectRequest = new JsonObjectRequest
(Request.Method.GET, url, null, new Response.Listener<JSONObject>() { ... } );
我的构建依赖项中还有实现'com.android.volley:volley:1.1.1'
。
我尝试了1.0.0和1.1.0,都没有解决我的问题。您使用了
new JsonObjectRequest(getString(R.string.getAddress), Request.Method.GET, null, new Response.Listener<JSONObject>(){...});
或
试试这个:
JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, "URL", null, new Response.Listener<JSONObject>() {
@Override
public void onResponse(JSONObject response) {
}
},null);
JsonObjectRequest-JsonObjectRequest=newjsonobjectrequest(Request.Method.GET,“URL”,null,new Response.Listener()){
@凌驾
公共void onResponse(JSONObject响应){
}
},空);
您已使用
new JsonObjectRequest(getString(R.string.getAddress), Request.Method.GET, null, new Response.Listener<JSONObject>(){...});
或
试试这个:
JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, "URL", null, new Response.Listener<JSONObject>() {
@Override
public void onResponse(JSONObject response) {
}
},null);
JsonObjectRequest-JsonObjectRequest=newjsonobjectrequest(Request.Method.GET,“URL”,null,new Response.Listener()){
@凌驾
公共void onResponse(JSONObject响应){
}
},空);
JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, "URL", null, new Response.Listener<JSONObject>() {
@Override
public void onResponse(JSONObject response) {
}
},null);