battery historian上传zip包后不出现submit按钮问题

从源码安装batteryhistorian【https://github.com/google/battery-historian#building-from-source-code】

  1. 安装go

    下载https://golang.google.cn/  解压后配置环境变量

    export GOPATH=$HOME/work  //这里GOPATH不是go的目录,是单独存放其他源码的路径

    export GOBIN=$GOPATH/bin

    export PATH=$PATH:$GOBIN

  2. 安装git

  3. 安装python

  4. 安装java

  5. 下载battery historian code

    $ go get -d -u github.com/google/battery-historian/... //这里时间有点久

  6. 启动

    $ cd $GOPATH/src/github.com/google/battery-historian

    # Compile Javascript files using the Closure compiler

    $ go run setup.go //这里时间有点久,没有下载成功可以手动下载

    参考博客:https://www.jianshu.com/p/0fa57924f228

    Closure-library 下载最新版本即可
    手动下载的源码放到third-party目录后,还要再编译一次
    $ go run setup.go

  7. # Run Historian on your machine (make sure $PATH contains $GOBIN)

    $ go run cmd/battery-historian/battery-historian.go [--port ]

  8. $ adb bugreport bugreport.zip

  9. cd $GOPATH/src/github.com/google/battery-historian     // $GOPATH=/Users/wenyuan/work/

    go run cmd/battery-historian/battery-historian.go [--port ]      //后续测试执行8、9即可

启动服务上传zip不显示submit按钮问题【这次用的chrom浏览器】

这个问题困扰我太久太久太久了!现在成功解决,高兴的想开瓶酒庆祝

最重要的是,两个月前研究的时候,+docker的方式就可以了,这次弄竟然不行,所以才用源码的方式

但是启动源码方式用浏览器访问,有一个文件会报404

192.168.110.221/:37 GET http://192.168.110.221:9999/compiled/historian-optimized.js?ver=2net::ERR_ABORTED 404 (Not Found)

在网上搜了很多,结果有的博主是要收费下载的,太贵,不舍得。没想到被阴差阳错的解决了,就是用docker的方式启动服务,然后将historian-optimized.js文件保存下来,

battery historian上传zip包后不出现submit按钮问题_第1张图片

放到/Users/wenyuan/work/src/github.com/google/battery-historian/compiled 目录下就可以啦

然后用源码启动服务

battery historian上传zip包后不出现submit按钮问题_第2张图片

battery historian上传zip包后不出现submit按钮问题_第3张图片

你可能感兴趣的:(耗电量测试)