实操搭建battery-historian平台

1 在D盘新建一个文件夹:gosrc

2git clone https://github.com/google/battery-historian.git

3 cd 到D:\gosrc\battery-historian>go mod init gosrc初始化模块名为gosrc,你可以自定义自己的名字

4// 执行该命令,更换为国内代理地址

go env -w GOPROXY=https://goproxy.cn,direct

5在D:\gosrc\battery-historian路径下执行go run setup.go

6会提示:

D:\gosrc\battery-historian>go run setup.go

setup.go:30:2: no required module provides package github.com/google/battery-historian/bugreportutils; to add it:

go get github.com/google/battery-historian/bugreportutils

setup.go:31:2: no required module provides package github.com/google/battery-historian/historianutils; to add it:

go get github.com/google/battery-historian/historianutils

7解决方法:

go get -d -u github.com/google/battery-historian/bugreportutils

go get -d -u github.com/google/battery-historian/historianutils

8继续执行,会报错

例如:depswriter.py No such file or directory 错误(更新golang再试)

例如:js解析错误,如:"Parse error. unknown @suppress parameter: strictMissingProperties"

解决方法:

go run setup.go (this fails)

cd third_party/closure-library/

git reset --hard v20170409

再cd到D:\gosrc\battery-historian路径下重新执行go run setup.go (this passes)

如:D:\gosrc\battery-historian>cd third_party/closure-library/

D:\gosrc\battery-historian\third_party\closure-library>git reset --hard v20170409

HEAD is now at 80b531334 Update doc for goog.crypt.Hash.prototype.update.

D:\gosrc\battery-historian\third_party\closure-library>

重新执行go run setup.go,如:

D:\gosrc\battery-historian>go run setup.go

Generating JS runfiles...

Generating optimized JS runfiles...

9:go run cmd/battery-historian/battery-historian.go

10:chrome浏览器输入:http://localhost:9999/即可,浏览添加zip文件

相关推荐
雨白25 分钟前
优雅地处理协程:取消机制深度剖析
android·kotlin
leon_zeng01 小时前
更改 Android 应用 ID (ApplicationId) 后遭遇记
android·发布
2501_916007472 小时前
iOS 混淆工具链实战,多工具组合完成 IPA 混淆与加固(iOS混淆|IPA加固|无源码混淆|App 防反编译)
android·ios·小程序·https·uni-app·iphone·webview
Jeled4 小时前
Retrofit 与 OkHttp 全面解析与实战使用(含封装示例)
android·okhttp·android studio·retrofit
ii_best6 小时前
IOS/ 安卓开发工具按键精灵Sys.GetAppList 函数使用指南:轻松获取设备已安装 APP 列表
android·开发语言·ios·编辑器
2501_915909066 小时前
iOS 26 文件管理实战,多工具组合下的 App 数据访问与系统日志调试方案
android·ios·小程序·https·uni-app·iphone·webview
limingade8 小时前
手机转SIP-手机做中继网关-落地线路对接软交换呼叫中心
android·智能手机·手机转sip·手机做sip中继网关·sip中继
RainbowC08 小时前
GapBuffer高效标记管理算法
android·算法
程序员码歌9 小时前
豆包Seedream4.0深度体验:p图美化与文生图创作
android·前端·后端
、花无将9 小时前
PHP:下载、安装、配置,与apache搭建
android·php·apache