关闭Android strict 模式
1 2 3 4 5 6 7 8 |
int SDK_INT = android.os.Build.VERSION.SDK_INT; //Log.v("kkk","SDK_INT:" + SDK_INT); if (SDK_INT > 8) { StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build(); StrictMode.setThreadPolicy(policy); //your codes here } |