BatteryHistory.java:在Android源代码的master分支中找不到文件
我编译了 master 分支并在模拟器中运行它。 “备件”菜单中的“电池历史记录”项不起作用。它导致“备件”的“强制关闭”。
DDMS 日志显示错误消息,例如:
04-11 11:13:14.080: E/AndroidRuntime(9593): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.android.settings/com.android.settings.battery_history.BatteryHistory}; have you declared this activity in your AndroidManifest.xml?
我发现“电池历史记录”使用类 com.android.settings.battery_history.BatteryHistory
但该类不再存在。它之前位于存储库 platform/packages/apps/Settings.git
中。我搜索了整个代码库,但找不到这个类。
该文件是否不再开源并被放入某些 JAR 文件中?
I compiled the master branch and run it in the emulator. The "Battery History" item in the "Spare Parts" menu, does not work. It results in "Force close" of "Spare parts".
DDMS log shows error message like:
04-11 11:13:14.080: E/AndroidRuntime(9593): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.android.settings/com.android.settings.battery_history.BatteryHistory}; have you declared this activity in your AndroidManifest.xml?
I found that "Battery History" uses the class com.android.settings.battery_history.BatteryHistory
but this class does not exist any more. It was in the repository platform/packages/apps/Settings.git
before. I search the whole code base and couldn't find this class.
Has this file become not open-source any more and been put into some JAR files?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
找到了答案。
com.android.settings.battery_history.BatteryHistory 类已被删除。
android.os.BatteryStats
用于类似的目的。同一次结帐中的 SpareParts 仍然使用过时的BatteryHistory
,因此它不起作用。Found the answer.
Class
com.android.settings.battery_history.BatteryHistory
has been removed.android.os.BatteryStats
is used for the similar purpose instead. The SpareParts in the same checkout still uses the outdatedBatteryHistory
, so it didn't work.