Android 截击锁定GUI线程?

Android 截击锁定GUI线程?,android,android-asynctask,android-volley,Android,Android Asynctask,Android Volley,我遇到了一个截击问题,当截击请求需要很长时间才能完成时,我的应用程序被锁定。我觉得这应该是一个相当普遍的问题,但我还没有找到解决它的方法 当反应迅速时,一切都很好。。。但是当响应很长时,我总是看到跳过的帧 我想我已经用我的调试器验证过,有一个单独的线程正在创建,创建对象,然后正确地销毁它自己。那就只剩下支撑主线的东西了 I/Choreographer﹕ Skipped 297 frames! The application may be doing too much work on its m

我遇到了一个截击问题,当截击请求需要很长时间才能完成时,我的应用程序被锁定。我觉得这应该是一个相当普遍的问题,但我还没有找到解决它的方法

当反应迅速时,一切都很好。。。但是当响应很长时,我总是看到跳过的帧

我想我已经用我的调试器验证过,有一个单独的线程正在创建,创建对象,然后正确地销毁它自己。那就只剩下支撑主线的东西了

I/Choreographer﹕ Skipped 297 frames!  The application may be doing too much work on its main thread.
I/MyApp: got response
D/Volley﹕ [1] Request.finish: 5008 ms: [ ] RequestURL
这是我的密码:

public class MyDataLoader {

    MyAsyncProcessor processor;

    public MyDataLoader() {
        processor = new MyAsyncProcessor();
    }

    public void fetchData(String url) {
        RequestQueue queue = Volley.newRequestQueue(activity);

        JsonObjectRequest getRequest = new JsonObjectRequest(Request.Method.GET, url, null,
                new Response.Listener<JSONObject>() {

                    // Function that's called when a response is received
                    @Override
                    public void onResponse(JSONObject response) {
                        Log.i("MyApp", "got response");
                        processor.execute(response);
                    }

                }, new Response.ErrorListener() {
            @Override
            public void onErrorResponse(VolleyError error) {
                //Do error stuff
            }
        });
// Add the request to the RequestQueue.
        queue.add(getRequest);
    }

    private class MyAsyncProcessor extends AsyncTask<JSONObject, Integer, DataObject> {

        @Override
        protected DataObject doInBackground(JSONObject... params) {
            //Process json here
            DataObject myDataObject = new DataObject(params[0]);
            return myDataObject;
        }

        @Override
        protected void onPostExecute(DataObject myDataObject){
            //Tell the activity we're ready for display
        }
    }
}

你解决了这个问题吗?我想我也看到了同样的事情。