一、编译时遇到的问题
1、命令找不到
错误信息:
./build_android.sh: line 18: --enable-shared: command not found ./build_android.sh: line 20: --disable-static: command not found ./build_android.sh: line 22: --disable-doc: command not found ./build_android.sh: line 24: --disable-ffmpeg: command not found ./build_android.sh: line 26: --disable-ffplay: command not found ./build_android.sh: line 28: --disable-ffprobe: command not found ./build_android.sh: line 30: --disable-ffserver: command not found ./build_android.sh: line 32: --disable-avdevice: command not found |
解决:
如果是直接copy网上的shell脚本,可能会是dos格式,请使用dos2unix build_android.sh 转换一下,删掉多余空格(这一点非常重要dos2unix 是一个工具,如果没有安装的话请先安装一下:brew install dos2unix ,很快就完事。
2、xmakefile 文件没有生成
错误信息:
./android_config.sh: line 36: --enable-shared: command not found Makefile:2: ffbuild/config.mak: No such file or directory Makefile:40: /tools/Makefile: No such file or directory Makefile:41: /ffbuild/common.mak: No such file or directory Makefile:91: /libavutil/Makefile: No such file or directory Makefile:91: /ffbuild/library.mak: No such file or directory Makefile:93: /fftools/Makefile: No such file or directory Makefile:94: /doc/Makefile: No such file or directory Makefile:95: /doc/examples/Makefile: No such file or directory Makefile:160: /tests/Makefile: No such file or directory make: *** No rule to make target `/tests/Makefile'. Stop. Makefile:2: ffbuild/config.mak: No such file or directory Makefile:40: /tools/Makefile: No such file or directory Makefile:41: /ffbuild/common.mak: No such file or directory Makefile:91: /libavutil/Makefile: No such file or directory Makefile:91: /ffbuild/library.mak: No such file or dire |