AndroidStudio 用OkHttp访问云端JSON时,模拟机成功,真机失败

[结帖] 需要https,不能用http
源代码如下:

public class MainActivity extends AppCompatActivity implements View.OnClickListener{

private TextView responseText;
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    Button sendRequest=(Button)findViewById(R.id.send_request);
    responseText=(TextView)findViewById(R.id.response_text);
    sendRequest.setOnClickListener(this);
}

@Override
public void onClick(View v){
    if(v.getId()==R.id.send_request){
        sendRequestWithOkHttp();
    }
}

private void sendRequestWithOkHttp(){
    new Thread(new Runnable() {
        @Override
        public void run() {
            try{
                OkHttpClient client=new OkHttpClient();
                Request request=new Request.Builder().url("http://guolin.tech/api/china").build();
                Response response=client.newCall(request).execute();
                String responseData=response.body().string();
                showResponse(responseData);
            }catch (Exception e){
                e.printStackTrace();
            }
        }
    }).start();


}

private void showResponse(final String response){
    runOnUiThread(new Runnable() {
        @Override
        public void run() {
            responseText.setText(response);
        }
    });
}

}
模拟机的图片如下:
模拟机的图片
真机调试的时候,按按钮没反应,不会显示文字。
最近装了新版本的Android Studio 不知道有没有影响

卸载一下android studio呢

在按钮点击的地方打印log信息,如果点击按钮有log出来,说明按钮点击事件有响应,然后检查手机有没有网