Android `getSystemService(Context.NSD_SERVICE)` 需要很长时间

标签 android applicationcontext network-service

Android 调用 applicationContext.getSystemService(Context.NSD_SERVICE) 需要很长时间。有时它会在大约 1 分钟后返回,有时会更长。

知道这里有什么问题吗?

最佳答案

重启手机即可。

这仍然是个问题,因为要求用户重启手机是一种糟糕的体验。

关于Android `getSystemService(Context.NSD_SERVICE)` 需要很长时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24119245/

相关文章:

Spring 确实存在时找不到 bean xml 配置文件

java - 使用 PropertyPlaceholderConfigurer 时 ${project.name} 丢失

android - 如何流式传输彩信 ://

android - 在android中获取Application实例的正确方法

java - 将 ListView 点击值传递给具有共享首选项的另一个 Activity

c# - 无法在 NetworkService 帐户中启动 Windows 服务

c# - 从作为网络服务运行的 Windows 服务生成进程

android - 改造和 jackson : JsonParseException on String response

java - 对象引用有多大?