java.net.SocketException: Address family not supported by protocol

后端 未结 1 1519
滥情空心
滥情空心 2020-12-12 03:13

in android I am getting the following error:

NativeStart.main(String[]) line: not available [native method]

my code is trying to

相关标签:
1条回答
  • 2020-12-12 03:40

    Try adding this to your AndroidManifest.xml as well:

    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    

    You also need to catch this Exception:

     catch(SocketException ex)
           {
             Log.e("Error : " , "Error on soapPrimitiveData() " + ex.getMessage());
               ex.printStackTrace();
           }
    
    0 讨论(0)
提交回复
热议问题