错误(StrictMode $ AndroidBlockGuardPolicy.onNetwork)

案头见蠹鱼,犹胜凡俦侣。这篇文章主要讲述错误:StrictMode $ AndroidBlockGuardPolicy.onNetwork相关的知识,希望能为你提供帮助。
 
【错误(StrictMode $ AndroidBlockGuardPolicy.onNetwork)】you have to insert 2 lines "StrictMode" on MainActivity Class, example‘s below:
 
在onCreate()方法下一行添加StrictMode
例子: public class MainActivity extends Activity {       @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         //come here         StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();         StrictMode.setThreadPolicy(policy);       } }

    推荐阅读