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

相关推荐
Yang-Never24 分钟前
Kotlin协程 -> Job.join() 完整流程图与核心源码分析
android·开发语言·kotlin·android studio
一笑的小酒馆6 小时前
Android性能优化之截屏时黑屏卡顿问题
android
懒人村杂货铺9 小时前
Android BLE 扫描完整实战
android
TeleostNaCl11 小时前
如何安装 Google 通用的驱动以便使用 ADB 和 Fastboot 调试(Bootloader)设备
android·经验分享·adb·android studio·android-studio·android runtime
fatiaozhang952712 小时前
中国移动浪潮云电脑CD1000-系统全分区备份包-可瑞芯微工具刷机-可救砖
android·网络·电脑·电视盒子·刷机固件·机顶盒刷机
2501_9159184113 小时前
iOS 开发全流程实战 基于 uni-app 的 iOS 应用开发、打包、测试与上架流程详解
android·ios·小程序·https·uni-app·iphone·webview
lichong95113 小时前
【混合开发】vue+Android、iPhone、鸿蒙、win、macOS、Linux之dist打包发布在Android工程asserts里
android·vue.js·iphone
Android出海13 小时前
Android 15重磅升级:16KB内存页机制详解与适配指南
android·人工智能·新媒体运营·产品运营·内容运营
一只修仙的猿13 小时前
毕业三年后,我离职了
android·面试
编程乐学13 小时前
安卓非原创--基于Android Studio 实现的新闻App
android·ide·android studio·移动端开发·安卓大作业·新闻app