出厂重置后,无法在Nearby api中建立WiFi Direct

时间:2018-02-21 14:34:35

标签: android android-wifi wifi-direct google-nearby

我在两个Android平板电脑上使用Nearby api在它们之间发送文件。它们可以成功连接,但在两台设备上恢复出厂设置后(即客户接收设备的方式),无法建立WiFi直连,并抛出java.io.FileNotFoundException:/ data / misc / wifi / networkHistory。 txt(没有这样的文件或目录)。然后在将设备连接到WiFi后,它最终会起作用。知道怎么处理这个问题吗?

logcat的: E / WifiNetworkHistory:readNetworkHistory:没有配置文件,恢复为默认值,java.io.FileNotFoundException:/data/misc/wifi/networkHistory.txt(没有这样的文件或目录)                                                    java.io.FileNotFoundException:/data/misc/wifi/networkHistory.txt(没有这样的文件或目录)                                                        at java.io.FileInputStream.open(Native Method)                                                        在java.io.FileInputStream。(FileInputStream.java:146)                                                        在java.io.FileInputStream。(FileInputStream.java:99)                                                        在com.android.server.wifi.WifiNetworkHistory.readNetworkHistory(WifiNetworkHistory.java:331)                                                        在com.android.server.wifi.WifiConfigManager.readNetworkHistory(WifiConfigManager.java:1920)                                                        在com.android.server.wifi.WifiConfigManager.loadConfiguredNetworks(WifiConfigManager.java:1750)                                                        在com.android.server.wifi.WifiConfigManager.loadAndEnableAllNetworks(WifiConfigManager.java:458)                                                        在com.android.server.wifi.WifiStateMachine $ SupplicantStartingState.processMessage(WifiStateMachine.java:4860)                                                        在com.android.internal.util.StateMachine $ SmHandler.processMsg(StateMachine.java:980)                                                        at com.android.internal.util.StateMachine $ SmHandler.handleMessage(StateMachine.java:799)                                                        在android.os.Handler.dispatchMessage(Handler.java:110)                                                        在android.os.Looper.loop(Looper.java:203)                                                        在android.os.HandlerThread.run(HandlerThread.java:61) 01-01 13:06:18.868 700-747 /? E / IpConfigStore:解析配置时出错:java.io.FileNotFoundException:/data/misc/wifi/ipconfig.txt(没有这样的文件或目录)

0 个答案:

没有答案