java.net.SocketException:协议问题不支持地址族
我制作了一个适用于 android 2.2 的应用程序 但将在android 2.3上使用 当我使用 2.3 模拟器启动应用程序时,我收到了此异常消息。
如何修复它?
12-22 14:09:17.820: I/ActivityManager(60): Start proc com.myteam for activity com.myteam/.ui.MijnTeamMain: pid=623 uid=10038 gids={3003, 1015} 12-22 14:09:18.660: D/dalvikvm(623): GC_EXTERNAL_ALLOC freed 57K, 49% free 2767K/5379K, external 2041K/2137K, paused 40ms 12-22 14:09:27.635: W/ActivityManager(60): Launch timeout has expired, giving up wake lock! 12-22 14:09:28.124: W/ActivityManager(60): Activity idle timeout for HistoryRecord{406cae40 com.myteam/.ui.MijnTeamMain} 12-22 14:09:28.685: D/SntpClient(60): request time failed: java.net.SocketException: Address family not supported by protocol 12-22 14:09:33.259: D/dalvikvm(310): GC_EXPLICIT freed 741K, 49% free 3363K/6535K, external 1625K/2137K, paused 90ms 12-22 14:09:38.389: D/dalvikvm(272): GC_EXPLICIT freed 12K, 52% free 2776K/5767K, external 1625K/2137K, paused 107ms 12-22 14:09:43.380: D/dalvikvm(354): GC_EXPLICIT freed 9K, 48% free 3523K/6727K, external 1625K/2137K, paused 66ms 12-22 14:09:48.470: D/dalvikvm(234): GC_EXPLICIT freed 6K, 51% free 2724K/5511K, external 1625K/2137K, paused 86ms
I made an app that works on android 2.2
but will be used on android 2.3
and when I started the app with 2.3 emulator I got this exception message.
How to fix it?
12-22 14:09:17.820: I/ActivityManager(60): Start proc com.myteam for activity com.myteam/.ui.MijnTeamMain: pid=623 uid=10038 gids={3003, 1015} 12-22 14:09:18.660: D/dalvikvm(623): GC_EXTERNAL_ALLOC freed 57K, 49% free 2767K/5379K, external 2041K/2137K, paused 40ms 12-22 14:09:27.635: W/ActivityManager(60): Launch timeout has expired, giving up wake lock! 12-22 14:09:28.124: W/ActivityManager(60): Activity idle timeout for HistoryRecord{406cae40 com.myteam/.ui.MijnTeamMain} 12-22 14:09:28.685: D/SntpClient(60): request time failed: java.net.SocketException: Address family not supported by protocol 12-22 14:09:33.259: D/dalvikvm(310): GC_EXPLICIT freed 741K, 49% free 3363K/6535K, external 1625K/2137K, paused 90ms 12-22 14:09:38.389: D/dalvikvm(272): GC_EXPLICIT freed 12K, 52% free 2776K/5767K, external 1625K/2137K, paused 107ms 12-22 14:09:43.380: D/dalvikvm(354): GC_EXPLICIT freed 9K, 48% free 3523K/6727K, external 1625K/2137K, paused 66ms 12-22 14:09:48.470: D/dalvikvm(234): GC_EXPLICIT freed 6K, 51% free 2724K/5511K, external 1625K/2137K, paused 86ms
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我在模拟器中也遇到了这个异常。
我认为没什么好担心的,只是模拟器中的一个错误。
它可能与您正在开发的应用程序无关。
I also get this exception in the emulator.
It is nothing to worry about, just a bug in the emulator, I think.
It probably has nothing to do with the app you are developing.
Sntp,是一种与时间相关的协议。我认为模拟器正在尝试获取时间,如果您的应用程序没有这样做,您不必担心。
Sntp, is a time related protocol. I think the emulator is trying to fetch time and if your app is not doing that, you need not worry.