编译最新版vlc for android(2017/4/2)踩过的坑

来源:互联网 发布:ekf算法 编辑:程序博客网 时间:2024/05/29 10:39

1.一定要有VPN

2.一定要参照https://wiki.videolan.org/AndroidCompile/来编译

3.在win7上,建议使用vmware+ubuntu15(官网最新的iso)

4.ndk,13版本,sdk一定要有带(platform,platform-tools)的,可以下载一个linux版本的adt-bundle

5.ubuntu15自带的protoc是2.*版本的,编译需要3.0的。所以,要卸载重装protoc。具体参照https://skyao.gitbooks.io/leaning-grpc/action/documentation/force_support_proto3.html。该文章中,执行到“生成文档”上面,就可以了。这时候,输入命令 protoc --version,显示3.0版本表示成功


6.A problem occurred configuring project ':api'.
> You have not accepted the license agreements of the following SDK components。解决方法:http://stackoverflow.com/questions/38096225/automatically-accept-all-sdk-licences。如果不行,就执行 “android update sdk”,会弹出sdkmanager操作框,手动更新,然后accept license就好。找不到命令“android”是因为步骤8中的环境变量未配置


7.$ANDROID_SDK目录下,需要有如下文件:build-tools/19.0.0 ,system-images/android-19/default/armeabi-v7a  

 可能需要手动移动文件夹


8.还是得参照2中的步骤,添加环境变量

export PATH=$PATH:$ANDROID_SDK/platform-tools:$ANDROID_SDK/tools.

9.Execution failed for task ':api:lint'.
> Lint found errors in the project; aborting build.

Execution failed for task ':libvlc:lint'.
> Lint found errors in the project; aborting build.

Execution failed for task ':medialibrary:lint'.
> Lint found errors in the project; aborting build.

需要到vlc-android目录下,对应的文件夹下面找到bulid.gradle文件,在里面添加如下:

android {

...

lintOptions {

abortOnError false

}

...

}


10.Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)

在vlc-android目录下,编辑gradle.properties,在文件最后添加org.gradle.daemon=false


11.clang++: error: linker command failed due to signal

a).sudo apt-get install aptitude

b. sudo aptitude install libc++


12.成功


未完待续。。。。


13.下载vlc/contrib/tarball/ffmpeg-***时,速度很慢,翻墙也很慢,我选择了手动下载,然后把ffmpeg-***.tar.xz放到vlc/contrib/tarball目录下。再执行./compile.sh时,提示 ffmpeg-***.githash文件不存在。我手动在vlc/contrb/tarball目录下,执行了echo "6ac0e7818399a57e4684202bac79f35b3561ad1e ../../contrib/tarballs/ffmpeg-6ac0e7818399a57e4684202bac79f35b3561ad1e.tar.xz" > "../../contrib/tarballs/ffmpeg-6ac0e7818399a57e4684202bac79f35b3561ad1e.githash"   

就可以继续执行编译了



0 0
原创粉丝点击