安卓网络权限异常

07-11 08:22:01.547: W/System.err(14045): java.io.FileNotFoundException: /data/data/com.example.googleplay/cache/home?index=0&: open failed: ENOENT (No such file or directory)
07-11 08:22:01.547: W/System.err(14045):     at libcore.io.IoBridge.open(IoBridge.java:409)
07-11 08:22:01.547: W/System.err(14045):     at java.io.FileInputStream.<init>(FileInputStream.java:78)
07-11 08:22:01.547: W/System.err(14045):     at java.io.FileReader.<init>(FileReader.java:42)
07-11 08:22:01.547: W/System.err(14045):     at com.example.googleplay.http.protocal.BaseProtocal.getCache(BaseProtocal.java:84)
07-11 08:22:01.547: W/System.err(14045):     at com.example.googleplay.http.protocal.BaseProtocal.getData(BaseProtocal.java:25)
07-11 08:22:01.547: W/System.err(14045):     at com.example.googleplay.ui.fragment.HomeFragment.onLoad(HomeFragment.java:45)
07-11 08:22:01.547: W/System.err(14045):     at com.example.googleplay.ui.fragment.BaseFragment$1.onLoad(BaseFragment.java:39)
07-11 08:22:01.547: W/System.err(14045):     at com.example.googleplay.view.LoadingPage$1.run(LoadingPage.java:108)
07-11 08:22:01.559: W/System.err(14045): Caused by: libcore.io.ErrnoException: open failed: ENOENT (No such file or directory)
07-11 08:22:01.559: W/System.err(14045):     at libcore.io.Posix.open(Native Method)
07-11 08:22:01.559: W/System.err(14045):     at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
07-11 08:22:01.563: W/System.err(14045):     at libcore.io.IoBridge.open(IoBridge.java:393)
07-11 08:22:01.563: W/System.err(14045):     ... 7 more
07-11 08:22:01.563: I/System.out(14045): url:http://127.0.0.1:8090/home?index=0
07-11 08:22:01.603: E/LogUtils(14045): org.apache.http.conn.HttpHostConnectException: Connection to http://127.0.0.1:8090 refused
07-11 08:22:01.603: E/LogUtils(14045):     at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:183)
07-11 08:22:01.603: E/LogUtils(14045):     at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
07-11 08:22:01.603: E/LogUtils(14045):     at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
07-11 08:22:01.603: E/LogUtils(14045):     at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
07-11 08:22:01.603: E/LogUtils(14045):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
07-11 08:22:01.603: E/LogUtils(14045):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
07-11 08:22:01.603: E/LogUtils(14045):     at com.example.googleplay.http.HttpHelper.execute(HttpHelper.java:61)
07-11 08:22:01.603: E/LogUtils(14045):     at com.example.googleplay.http.HttpHelper.get(HttpHelper.java:34)
07-11 08:22:01.603: E/LogUtils(14045):     at com.example.googleplay.http.protocal.BaseProtocal.getDataFromServer(BaseProtocal.java:46)
07-11 08:22:01.603: E/LogUtils(14045):     at com.example.googleplay.http.protocal.BaseProtocal.getData(BaseProtocal.java:29)
07-11 08:22:01.603: E/LogUtils(14045):     at com.example.googleplay.ui.fragment.HomeFragment.onLoad(HomeFragment.java:45)
07-11 08:22:01.603: E/LogUtils(14045):     at com.example.googleplay.ui.fragment.BaseFragment$1.onLoad(BaseFragment.java:39)
07-11 08:22:01.603: E/LogUtils(14045):     at com.example.googleplay.view.LoadingPage$1.run(LoadingPage.java:108)
07-11 08:22:01.603: E/LogUtils(14045): Caused by: java.net.ConnectException: socket failed: EACCES (Permission denied)
07-11 08:22:01.603: E/LogUtils(14045):     at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:181)
07-11 08:22:01.603: E/LogUtils(14045):     ... 12 more
07-11 08:22:01.603: E/LogUtils(14045): Caused by: java.net.SocketException: socket failed: EACCES (Permission denied)
07-11 08:22:01.603: E/LogUtils(14045):     at libcore.io.IoBridge.socket(IoBridge.java:576)
07-11 08:22:01.603: E/LogUtils(14045):     at java.net.PlainSocketImpl.create(PlainSocketImpl.java:201)
07-11 08:22:01.603: E/LogUtils(14045):     at java.net.Socket.checkOpenAndCreate(Socket.java:663)
07-11 08:22:01.603: E/LogUtils(14045):     at java.net.Socket.connect(Socket.java:807)
07-11 08:22:01.603: E/LogUtils(14045):     at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:119)
07-11 08:22:01.603: E/LogUtils(14045):     at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:144)
07-11 08:22:01.603: E/LogUtils(14045):     ... 12 more
07-11 08:22:01.603: E/LogUtils(14045): Caused by: libcore.io.ErrnoException: socket failed: EACCES (Permission denied)
07-11 08:22:01.603: E/LogUtils(14045):     at libcore.io.Posix.socket(Native Method)
07-11 08:22:01.603: E/LogUtils(14045):     at libcore.io.BlockGuardOs.socket(BlockGuardOs.java:181)
07-11 08:22:01.603: E/LogUtils(14045):     at libcore.io.IoBridge.socket(IoBridge.java:561)
07-11 08:22:01.603: E/LogUtils(14045):     ... 17 more
07-11 08:22:01.615: E/LogUtils(14045): org.apache.http.conn.HttpHostConnectException: Connection to http://127.0.0.1:8090 refused
07-11 08:22:01.615: E/LogUtils(14045):     at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:183)
07-11 08:22:01.615: E/LogUtils(14045):     at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
07-11 08:22:01.615: E/LogUtils(14045):     at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
07-11 08:22:01.615: E/LogUtils(14045):     at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
07-11 08:22:01.615: E/LogUtils(14045):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
07-11 08:22:01.615: E/LogUtils(14045):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
07-11 08:22:01.615: E/LogUtils(14045):     at com.example.googleplay.http.HttpHelper.execute(HttpHelper.java:61)
07-11 08:22:01.615: E/LogUtils(14045):     at com.example.googleplay.http.HttpHelper.get(HttpHelper.java:34)
07-11 08:22:01.615: E/LogUtils(14045):     at com.example.googleplay.http.protocal.BaseProtocal.getDataFromServer(BaseProtocal.java:46)
07-11 08:22:01.615: E/LogUtils(14045):     at com.example.googleplay.http.protocal.BaseProtocal.getData(BaseProtocal.java:29)
07-11 08:22:01.615: E/LogUtils(14045):     at com.example.googleplay.ui.fragment.HomeFragment.onLoad(HomeFragment.java:45)
07-11 08:22:01.615: E/LogUtils(14045):     at com.example.googleplay.ui.fragment.BaseFragment$1.onLoad(BaseFragment.java:39)
07-11 08:22:01.615: E/LogUtils(14045):     at com.example.googleplay.view.LoadingPage$1.run(LoadingPage.java:108)
07-11 08:22:01.615: E/LogUtils(14045): Caused by: java.net.ConnectException: socket failed: EACCES (Permission denied)
07-11 08:22:01.615: E/LogUtils(14045):     at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:181)
07-11 08:22:01.615: E/LogUtils(14045):     ... 12 more
07-11 08:22:01.615: E/LogUtils(14045): Caused by: java.net.SocketException: socket failed: EACCES (Permission denied)
07-11 08:22:01.615: E/LogUtils(14045):     at libcore.io.IoBridge.socket(IoBridge.java:576)
07-11 08:22:01.615: E/LogUtils(14045):     at java.net.PlainSocketImpl.create(PlainSocketImpl.java:201)
07-11 08:22:01.615: E/LogUtils(14045):     at java.net.Socket.checkOpenAndCreate(Socket.java:663)
07-11 08:22:01.615: E/LogUtils(14045):     at java.net.Socket.connect(Socket.java:807)
07-11 08:22:01.615: E/LogUtils(14045):     at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:119)
07-11 08:22:01.615: E/LogUtils(14045):     at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:144)
07-11 08:22:01.615: E/LogUtils(14045):     ... 12 more
07-11 08:22:01.615: E/LogUtils(14045): Caused by: libcore.io.ErrnoException: socket failed: EACCES (Permission denied)
07-11 08:22:01.615: E/LogUtils(14045):     at libcore.io.Posix.socket(Native Method)
07-11 08:22:01.615: E/LogUtils(14045):     at libcore.io.BlockGuardOs.socket(BlockGuardOs.java:181)
07-11 08:22:01.615: E/LogUtils(14045):     at libcore.io.IoBridge.socket(IoBridge.java:561)
07-11 08:22:01.615: E/LogUtils(14045):     ... 17 more
07-11 08:22:01.631: E/LogUtils(14045): org.apache.http.conn.HttpHostConnectException: Connection to http://127.0.0.1:8090 refused
07-11 08:22:01.631: E/LogUtils(14045):     at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:183)
07-11 08:22:01.631: E/LogUtils(14045):     at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
07-11 08:22:01.631: E/LogUtils(14045):     at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
07-11 08:22:01.631: E/LogUtils(14045):     at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
07-11 08:22:01.631: E/LogUtils(14045):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
07-11 08:22:01.631: E/LogUtils(14045):     at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
07-11 08:22:01.631: E/LogUtils(14045):     at com.example.googleplay.http.HttpHelper.execute(HttpHelper.java:61)
07-11 08:22:01.631: E/LogUtils(14045):     at com.example.googleplay.http.HttpHelper.get(HttpHelper.java:34)
07-11 08:22:01.631: E/LogUtils(14045):     at com.example.googleplay.http.protocal.BaseProtocal.getDataFromServer(BaseProtocal.java:46)
07-11 08:22:01.631: E/LogUtils(14045):     at com.example.googleplay.http.protocal.BaseProtocal.getData(BaseProtocal.java:29)
07-11 08:22:01.631: E/LogUtils(14045):     at com.example.googleplay.ui.fragment.HomeFragment.onLoad(HomeFragment.java:45)
07-11 08:22:01.631: E/LogUtils(14045):     at com.example.googleplay.ui.fragment.BaseFragment$1.onLoad(BaseFragment.java:39)
07-11 08:22:01.631: E/LogUtils(14045):     at com.example.googleplay.view.LoadingPage$1.run(LoadingPage.java:108)
07-11 08:22:01.631: E/LogUtils(14045): Caused by: java.net.ConnectException: socket failed: EACCES (Permission denied)
07-11 08:22:01.631: E/LogUtils(14045):     at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:181)
07-11 08:22:01.631: E/LogUtils(14045):     ... 12 more
07-11 08:22:01.631: E/LogUtils(14045): Caused by: java.net.SocketException: socket failed: EACCES (Permission denied)
07-11 08:22:01.631: E/LogUtils(14045):     at libcore.io.IoBridge.socket(IoBridge.java:576)
07-11 08:22:01.631: E/LogUtils(14045):     at java.net.PlainSocketImpl.create(PlainSocketImpl.java:201)
07-11 08:22:01.631: E/LogUtils(14045):     at java.net.Socket.checkOpenAndCreate(Socket.java:663)
07-11 08:22:01.631: E/LogUtils(14045):     at java.net.Socket.connect(Socket.java:807)
07-11 08:22:01.631: E/LogUtils(14045):     at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:119)
07-11 08:22:01.631: E/LogUtils(14045):     at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:144)
07-11 08:22:01.631: E/LogUtils(14045):     ... 12 more
07-11 08:22:01.631: E/LogUtils(14045): Caused by: libcore.io.ErrnoException: socket failed: EACCES (Permission denied)
07-11 08:22:01.631: E/LogUtils(14045):     at libcore.io.Posix.socket(Native Method)
07-11 08:22:01.631: E/LogUtils(14045):     at libcore.io.BlockGuardOs.socket(BlockGuardOs.java:181)
07-11 08:22:01.631: E/LogUtils(14045):     at libcore.io.IoBridge.socket(IoBridge.java:561)
07-11 08:22:01.631: E/LogUtils(14045):     ... 17 more

1.虽然报红部分的第一行没有caused by..但是也是可以从中看出原因

2.中间的caused by..已经说明了权限异常了

时间: 2024-10-05 23:55:17

安卓网络权限异常的相关文章

安卓 网络编程

这几天学校实训项目需要开始学习安卓编程,其中有一部分是涉及网络知识, 1 private class SendThread extends Thread 2 { 3 public SendThread(String s) 4 { 5 mURL = s; 6 } 7 public void run() 8 { 9 BasicHttpParams httpParams; 10 httpParams = new BasicHttpParams(); 11 HttpConnectionParams.se

安卓网络请求图片到图片的三级缓存技术(内存缓存,本地缓存,网络缓存)

安卓网络请求图片,对于我们来说并不陌生,因为每个应用都有可能会用到这一技术.通常情况下,我们第一次都是从网络上请求图片资源,然后将 图片资源保存到内存和本地,下一次动态显示图片的时候就不需要再从网络上请求图片资源了,直接从本地或者内存中获取就可以了.这就涉及到图片 的三级缓存技术,分别是内存缓存,本地缓存,网络缓存. 缓存的流程图: 首先我们定义一个类叫ClassLoader: package com.jsako.showprodinfodemo; import java.io.FileOutp

iOS 10 的坑:新机首次安装 app,请求网络权限“是否允许使用数据”

这个坑最近弄得我很抓狂,不过现在基本弄清楚了.记录一下过程中我收集到的信息,分享给大家. 症状 iOS 10 之后,陆陆续续地有用户联系我们,说新机第一次安装.第一次启动的时候,app 首屏一片空白,完全没数据.kill 掉重新打开就好了. 一开始以为是用户网络情况不好,但随着越来越多的用户报告这个问题,我意识到这并不是偶然情况.但是并非所有用户都如此. 而且卸载掉之后,如果再装,也不会出现这现象.问题只会出现在这台设备第一次安装.第一次启动的情况下.如果把手机抹掉.重置,问题还能重现. 定位问

hadoop学习;hdfs操作;运行抛出权限异常: Permission denied;api查看源码方法;源码不停的向里循环;抽象类通过debug查找源码

eclipse快捷键alt+shift+m将选中的代码封装成方法:alt+shift+l将选中的代码添加对应类型放回参数 当调用一个陌生方法时,进入源码不停的向里循环,当找不到return类似方法的时候,可以看到最原始的方法 package com.kane.hdfs; import java.io.InputStream; import java.net.URL; import org.apache.hadoop.fs.FsUrlStreamHandlerFactory; import org

Android - 不同手机的权限异常

不同手机的权限异常 本文地址:http://blog.csdn.net/caroline_wendy 添加手机快捷方式和其他读写配置方面,需要添加某些定制的读写权限(READ_SETTINGS\WRITE_SETTINGS),可以是解决一些问题. 包括:摩托罗拉(motorola),HTC(htc),宏碁(aspire),360(qihoo360),天翼(ty),索尼爱立信(sonyericsson),OPPO(oppo), 联发科(mediatek),华为(huawei),百奇天气(baiqi

linux 系统 chmod 误操作权限异常修复方式

Linux 系统中如果意外误操作将根目录或系统默认关键目录权限批量设置,比如 chmod -R 777 / ,系统中的大部分服务以及命令将无法使用,这时候可以通过系统自带的 getfacl 和 setfacl 命令来拷贝和还原系统权限,若是其他系统目录被误操作,同样可行. 假设执行了 chmod -R 777 / ,常见会导致的问题有:a.密码正确,但是无法登陆系统b.重启服务器后启动卡住c.服务启动失败,如 sshd可以使用命令 rpm -Va 查看文件权限是否被修改: 修复的方法如下:1.通

负载均衡服务TCP端口健康检查成功,为什么在后端业务日志中出现网络连接异常信息?

负载均衡服务TCP端口健康检查成功,为什么在后端业务日志中出现网络连接异常信息? 原文: https://help.aliyun.com/document_detail/127193.html?spm=a2c4g.11186623.6.606.5b7a7ee5RD6Xai 问题现象: 负载均衡后端配置TCP服务端口后,后端业务日志中频繁出现类似如下网络连接异常错误信息.经进抓包分析,发现相关请求来自负载均衡服务器,同时负载均衡主动向服务器发送了RST数据包. 问题原因: 该问题和负载均衡的健康检

【异常】连接MySQL权限异常SQLException: Access denied for user &#39;root&#39;@&#39;192.168.xxx.xxx&#39; (using password: YES)

IDEA程序访问Mysql,出现权限异常.SQLException: Access denied for user 'root'@'192.168.119.1' (using password: YES)应该是mysql中的库.表等对特定的用户.特定的ip开放,所以可以修改一下,在mysql中执行:grant all privileges on *.* to [email protected]'%' identified by '123456';表示root用户可以在任何ip都可以访问任何库,密

安卓用户权限--挂载的sdcard有读写权限

挂载的sdcard默认组 aid_sdcard_r ,www-data没有写权限如果给 aid_sdcard_r 和 www-data 添加到 aid_media_rw ,则 www-data 就能读写 sdcard usermod -a -G aid_media_rw aid_sdcard_rusermod -a -G aid_media_rw www-data 给 www-data 赋予 网络权限usermod -a -G aid_inet www-data <permission name