*** recipe commences before first target. Stop

我下载了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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值