打开/ sys / class / power_supply / bms / resistance时出错

时间:2016-12-28 05:59:43

标签: android moto

  

当我启动应用程序然后在调试日志中打印错误时,我想找出它是应用程序端问题还是设备端,我是android开发的新手所以任何人都可以确认这个为什么下面的日志来了?

设备Moto G3

12-28 11:09:31.190 6380-6403/? E/MC_LineReader: Error opening /sys/class/power_supply/bms/resistance
                                                java.io.FileNotFoundException: /sys/class/power_supply/bms/resistance: open failed: ENOENT (No such file or directory)
                                                    at libcore.io.IoBridge.open(IoBridge.java:452)
                                                    at java.io.FileInputStream.<init>(FileInputStream.java:76)
                                                    at java.io.FileInputStream.<init>(FileInputStream.java:103)
                                                    at java.io.FileReader.<init>(FileReader.java:66)
                                                    at com.motorola.motocare.util.LineReader.<init>(LineReader.java:20)
                                                    at com.motorola.motocare.util.LineReader$1.<init>(LineReader.java:53)
                                                    at com.motorola.motocare.util.LineReader.firstLineReader(LineReader.java:53)
                                                    at com.motorola.motocare.util.BatteryUtils.getBatteryResistance(BatteryUtils.java:130)
                                                    at com.motorola.motocare.action.BatteryLevelAction.onReceiveImpl(BatteryLevelAction.java:42)
                                                    at com.motorola.motocare.util.BackgroundReceiver$1.run(BackgroundReceiver.java:14)
                                                    at android.os.Handler.handleCallback(Handler.java:746)
                                                    at android.os.Handler.dispatchMessage(Handler.java:95)
                                                    at android.os.Looper.loop(Looper.java:148)
                                                    at android.os.HandlerThread.run(HandlerThread.java:61)
                                                 Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
                                                    at libcore.io.Posix.open(Native Method)
                                                    at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
                                                    at libcore.io.IoBridge.open(IoBridge.java:438)
                                                    at java.io.FileInputStream.<init>(FileInputStream.java:76) 
                                                    at java.io.FileInputStream.<init>(FileInputStream.java:103) 
                                                    at java.io.FileReader.<init>(FileReader.java:66) 
                                                    at com.motorola.motocare.util.LineReader.<init>(LineReader.java:20) 
                                                    at com.motorola.motocare.util.LineReader$1.<init>(LineReader.java:53) 
                                                    at com.motorola.motocare.util.LineReader.firstLineReader(LineReader.java:53) 
                                                    at com.motorola.motocare.util.BatteryUtils.getBatteryResistance(BatteryUtils.java:130) 
                                                    at com.motorola.motocare.action.BatteryLevelAction.onReceiveImpl(BatteryLevelAction.java:42) 
                                                    at com.motorola.motocare.util.BackgroundReceiver$1.run(BackgroundReceiver.java:14) 
                                                    at android.os.Handler.handleCallback(Handler.java:746) 
                                                    at android.os.Handler.dispatchMessage(Handler.java:95) 
                                                    at android.os.Looper.loop(Looper.java:148) 
                                                    at android.os.HandlerThread.run(HandlerThread.java:61) 

1 个答案:

答案 0 :(得分:0)

这是一个很可能与其SD卡相关的设备问题。当SD卡被移除时,我在同一设备上遇到了同样的问题。要摆脱它,试着:

  • 放回SD卡或;
  • 转到Settings-> Storage and USB并检查是否还有 链接到SD卡并为其选择Forget选项,但请注意 它将删除对存储在其中的数据的所有引用 它。