我下载了android5.1的源码进行编译,第一步make update-api就报错了,
make update-api
*** recipe commences before first target. Stop。找了半天,网上都说什么android.mk文件每句命令必须是以【tab】开头,但这是AOSP源码,不可能是make文件问题,后来继续查,找到了一篇stack问答,
*** recipe commences before first target. Stop
https://stackoverflow.com/questions/34562221/recipe-commences-before-first-target-stop
当然,这位老哥情况和我略有区别,他编译的是2.3.1,我也分析了一下,我当前系统开发环境是针对安卓8.0,默认使用make4.1版本,很有可能是编译器问题。
我下载了3.8.2的编译器,根据这篇文章,进行了编译安装。
Ubuntu下配置make3.8.1
https://blog.youkuaiyun.com/victory08/article/details/51593994
1 下载make-3.81.tar.bz2
下载地址:http://ftp.gnu.org/gnu/make/
2 解压
tar -xvf make-3.81.tar.bz2
3 编译
./configure
make
4 配置环境变量,添加到个人账号根目录下的.bashrc文件最后一行,保存后source 下
vi .bashrc
export PATH=/你的make路径/make-3.81:$PATH
source .bashrc
查看当前make版本,可以看到已经配置为3.8.1
make --version
GNU Make 3.82
Built for x86_64-unknown-linux-gnu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
————————————————
版权声明:本文为优快云博主「victory08」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.youkuaiyun.com/victory08/article/details/51593994