vlc-android 的编译过程

参考官方文档:https://wiki.videolan.org/AndroidCompile#Get_VLC_Source

值得注意的的地方:

1.切记安装以下工具

sudo apt-get install automake ant autopoint cmake build-essential libtool \
     patch pkg-config protobuf-compiler ragel subversion unzip git \
    openjdk-8-jre openjdk-8-jdk

 

最好设置代理,应为有些包不FQ太慢,还容易出错
2.修改

compile.sh

 

应为这个包有点大,FQ也慢

最好先下载好,在本地搭建服务器,然后替换路径

如:

GRADLE_URL=http://127.0.0.1/gradle-3.4.1-bin.zip

 
貌似后面还有一次下载该文件,找不到在哪里修改路径,直接中断程序,查找零时文件发现在/root/.gradel/wrapper/dists/gradel-3.4.3-bin/xxx/下

删除原先的文件,替换为

gradle-3.4.1-bin.zip

重新运行脚本


3.记录一个错误:

make: Leaving directory `/root/AndroidStudioProjects/vlc-android/medialibrary'
Dumping dbg symbols info .dbg/armeabi-v7a
fatal: Not a git repository (or any of the parent directories): .git

FAILURE: Build failed with an exception.

* Where:
Build file '/root/AndroidStudioProjects/vlc-android/vlc-android/build.gradle' line: 203

* What went wrong:
A problem occurred evaluating project ':vlc-android'.
> Process 'command 'git'' finished with non-zero exit value 128

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1.954 secs

 
google了好久还是不知道怎么解决,有人说是git下载不完全导致建议重新编译,

想想应该是最后一步了,重来代价太大,4.2G的文件又要下好久。

索性看看代码,看能怎么改一下:

def revision() {
    def code = new ByteArrayOutputStream()
    //exec {
    //    commandLine 'git', 'rev-parse', '--short', 'HEAD'
    //    standardOutput = code
    //}
    return code.toString()
}

 
应该是跟版本相关的,注释掉后者随便给一个字符串应该没关系

重新运行,果然成功了

在 vlc-android/vlc-android/build/outputs/apk/下会生成安装包

转载于:https://www.cnblogs.com/lanqie/p/7442685.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值