1

I am new to use the Android Studio, and I find a problem when I debug the project. After attach a Debugger to the process,I can debug it in most functions,it means I can press F8 step by step debug it. But it never go into the Asynctask,

Just like the code , I cannot get there,but the I can see the logs to confirm the code have executed. Could anybody help me with it? Thanks

And my project is too big so we use the multiDex. Here is My SyncTask, and I put a break point in the doInBackground();

private class GetMyApplyListCountTask extends
            AsyncTask<Void, Void, Query<MyApplyInfo>> {

        @Override
        protected Query<MyApplyInfo> doInBackground(Void... params) {
            HashMap<String, String> map = new HashMap<String, String>();
            if (mApp.getUser() != null) {
                if (!StringUtils.isNullOrEmpty(mApp.getUser().userid)) {
                    map.put("Uid", mApp.getUser().userid);
                }
                if (!StringUtils.isNullOrEmpty(mApp.getUser().mobilephone)) {
                    map.put("UserPhone", mApp.getUser().mobilephone);
                }
            }
            map.put("messagename", "getMyLoanAppList");
            map.put("CurrentPage", "1");
            map.put("PageSize", "20");
            try {
                return HttpApi.getNewQueryBeanAndList(map, MyApplyInfo.class,
                        "MyLoanInfoDetail", MyApplyCountInfo.class,
                        "MyApplyLoanInfo");
            } catch (Exception e) {
                e.printStackTrace();
            }
            return null;
    } 
}
Pratik Butani
  • 60,504
  • 58
  • 273
  • 437
fisher
  • 21
  • 4

1 Answers1

0

AsyncTask is not a main thread. Debugging multiple threads may be tricky. Check this answer for more information: Debugging multiple threads in eclipse - (Eric Kaju's answer to be more precise)

Even though it's about Eclipse I don't think it will matter in your case

Community
  • 1
  • 1
Vendetta8247
  • 592
  • 1
  • 5
  • 30