实操搭建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文件

相关推荐
jzlhll12318 分钟前
android ViewModel传参
android
有位神秘人20 分钟前
Android最新动态权限申请框架YbPermissions
android
Android-Flutter36 分钟前
android compose Switch开关 使用
android·kotlin
鹏程十八少40 分钟前
Android 深入剖析Android内存泄漏:ViewPager2与Fragment的生命周期陷阱
android·前端·app
Kapaseker41 分钟前
告别 Kotlin 中臃肿的 when 表达式
android·kotlin
2501_9160074743 分钟前
iOS 自动化上架的工具组合,在多平台环境中实现稳定发布
android·运维·ios·小程序·uni-app·自动化·iphone
飞天小蜈蚣1 小时前
python-django_ORM的基本操作
android·python·django
we1less1 小时前
[audio] AudioPolicy (一) 分析
android
TheNextByte11 小时前
如何在不使用USB数据线的情况下将文件从电脑传到安卓手机?
android·智能手机·电脑
李小轰1 小时前
把手机变成听诊器!摄像头 30 秒隔空测心率 - 开箱即用
android·视觉检测