棋子 · 2020年02月24日

Socket Exception in Android

I am working on an Android Application in which I got stuck in an issue. The problem is that, "When I run this method mentioned below in code, I am getting an error of socket Exception ((Permission denied) i.e, java.net.SocketException: socket failed:). I tried many time to resolve this issue, but still getting experiencing this problem. I know this is an android developer forum community where I am seeking some solution. Please help me for resolving my query. Here is code please check and reply me asap.

1 个回答 得票排序 · 时间排序
极术小姐姐 · 2020年02月24日

Have you set up your Manifest xml file to get permission to access the internet? i.e.

<uses-permission android:name="android.permission.INTERNET"/>
If you haven't, you need to inform any user of your app of the permissions you're requesting before you can use a resource.

你的回答
关注数
1
收藏数
0
浏览数
3153
极术小姐姐
极术微信服务号
关注极术微信号
实时接收点赞提醒和评论通知
安谋科技学堂公众号
关注安谋科技学堂
实时获取安谋科技及 Arm 教学资源
安谋科技招聘公众号
关注安谋科技招聘
实时获取安谋科技中国职位信息