error : JsonHttpResponseHandler cannot be resolved to a type

682 views Asked by At

Here is my code showing the above error

    import org.json.*;
import com.loopj.android.http.*;

class TwitterRestClientUsage {
    public void getPublicTimeline() throws JSONException {
        TwitterRestClient.get("statuses/public_timeline.json", null, new JsonHttpResponseHandler() {
            @Override
            public void onSuccess(JSONArray timeline) {
                // Pull out the first event on the public timeline
                JSONObject firstEvent = timeline.get(0);
                String tweetText = firstEvent.getString("text");

                // Do something with the response
                System.out.println(tweetText);
            }
        });
    }
}

in the get method i am getting this error,could you please suggest suitable solution for this.

1

There are 1 answers

0
AudioBubble On

Need to add asyncHttpClent jar to fix this.