Strange NetworkOnMainThreadException in Android app?

后端 未结 3 764
眼角桃花
眼角桃花 2020-12-11 10:42

The idea is to start a chat. So I have this properties in my class:

private MulticastSocket so;
private EditText messageBoard;
private InetAddress serverAddr         


        
3条回答
  •  攒了一身酷
    2020-12-11 11:29

    If you just want an easy work-around this, specify a minimum SDK version of Froyo or Gingerbread and omit the targetSdkVersion:

    android:minSdkVersion="8"
    

提交回复
热议问题