Connection refused when trying to acces local webservice using Android

后端 未结 4 943
庸人自扰
庸人自扰 2021-01-17 03:44

I am creating a server built in Visual Basic 2010 and that program can insert/update/delete to a database that I use. I created a local Web Service that is used to synchroni

4条回答
  •  温柔的废话
    2021-01-17 04:46

    Try adding:

    if (android.os.Build.VERSION.SDK_INT > 9) {
        StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
        StrictMode.setThreadPolicy(policy);
    }
    

    Does this help?

提交回复
热议问题