Android Studio Errors

1.The import org.apache.http.client;

tip: cannot be resolved;

resolve: 

add this line in build.gradle android { useLibrary 'org.apache.http.legacy' }

2.Can't create handler inside thread that has not called Looper.prepare()

tip:Can't create handler inside thread that has not called Looper.prepare()

resolve:

new Thread() {

  public void run() {

    Looper.prepare();

    //...

    Looper.loop();

  }

}.start();

posted @ 2016-02-17 14:43  半凉半夏  阅读(200)  评论(0编辑  收藏  举报