1

AsyncHttpClient can not call patch android.

How to call it thanks!

 RequestParams params = new RequestParams();
        String URL = "xxxxxx;
        params.put("aaa", aaa);
        params.put("bbb", bbb);

        AsyncHttpClient client = new AsyncHttpClient();
        client.patch(URL, params, new JsonHttpResponseHandler() {
            @Override
            public void onSuccess(int statusCode, Header[] headers, JSONObject response) {

            }

            @Override
            public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {
                super.onFailure(statusCode, headers, throwable, errorResponse);

            }
        });

at line client.patch is can not call patch

How to call it?

ARR.s
  • 769
  • 4
  • 20
  • 39

1 Answers1

2

Probably you are not using the proper import statement. The code looks fine, I see that you are trying to use: com.loopj.android.http.AsyncHttpClient, are you using the following import statement:

import com.loopj.android.http.AsyncHttpClient;

Updated based on comments/edits: If you are getting "not able to resolve symbol" message then probably you are not having the proper library version or the library order is not the proper one. Ensure that you are using the proper version and your library is on top of the dependency list (in build.gradle). Maybe it's clashing with another library.

dan
  • 13,132
  • 3
  • 38
  • 49
  • ummm ,but I added – ARR.s Aug 11 '17 at 11:08
  • @ARR.s Then, please update your question with the error message that your are getting. – dan Aug 11 '17 at 11:10
  • @ARR.s Can you update your question with the message that Android Studio is providing? Or just add an image capture with the error message. It's not clear from "can not call patch" message, what is the issue. – dan Aug 11 '17 at 11:14