在ubuntu20.04下解决编译Android4.4.2因为make版本的问题编译不过的问题

在ubuntu20.04下解决编译Android4.4.2因为make版本的问题编译不过的问题


一、问题:
/bin/bash: python: 未找到命令
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.4.2
TARGET_PRODUCT=astar_evb30
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a7
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=
HOST_BUILD_TYPE=release
BUILD_ID=KVT49L
OUT_DIR=out
============================================

rootroot@rootroot-Lenovo-IdeaPad-S410:~/r16/android$ extract-bsp 
/home/rootroot/r16/android/device/*/astar-evb30/bImage copied!
/home/rootroot/r16/android/device/*/astar-evb30/modules copied!
rootroot@rootroot-Lenovo-IdeaPad-S410:~/r16/android$ make -j4
build/core/main.mk:45: ********************************************************************************
build/core/main.mk:46: *  You are using version 4.2.1 of make.
build/core/main.mk:47: *  Android can only be built by versions 3.81 and 3.82.
build/core/main.mk:48: *  see https://source.android.com/source/download.html
build/core/main.mk:49: ********************************************************************************
build/core/main.mk:50: *** stopping。 停止。

rootroot@rootroot-Lenovo-IdeaPad-S410:~/r16/android$ make
build/core/main.mk:45: ********************************************************************************
build/core/main.mk:46: *  You are using version 4.2.1 of make.
build/core/main.mk:47: *  Android can only be built by versions 3.81 and 3.82.
build/core/main.mk:48: *  see https://source.android.com/source/download.html
build/core/main.mk:49: ********************************************************************************
build/core/main.mk:50: *** stopping。 停止。
rootroot@rootroot-Lenovo-IdeaPad-S410:~/r16/android$ make --version
GNU Make 4.2.1
为 x86_64-pc-linux-gnu 编译
Copyright (C) 1988-2016 Free Software Foundation, Inc.
许可证:GPLv3+:GNU 通用公共许可证第 3 版或更新版本<http://gnu.org/licenses/gpl.html>。
本软件是自由软件:您可以自由修改和重新发布它。
在法律允许的范围内没有其他保证。
rootroot@rootroot-Lenovo-IdeaPad-S410:~/r16/android$ 


二、解决办法:
百度:build/core/main.mk:47: *  Android can only be built by versions 3.81 and 3.82.


(这个方法不行!!!!)
https://blog.csdn.net/FightFightFight/article/details/79696460?utm_source=blogxgwz8
编译源码时,Android can only be built by versions 3.81 and 3.82解决方法

https://www.cnblogs.com/blowing-in-the-wind/p/5960375.html
Android can only be built by versions 3.81 and 3.82

卸载当前make 4.1,安装make3.82,如果卸载4.1了,那么在编译高版本源码时,又必须重新安装,因此不推荐这种方式。
但是现在主要是要测试验证ubuntu20.04的问题。就修改Android了。


最后直接干掉了出错了地方就OK了!#$(error stopping)


Z:\r16\android\build\core\main.mk
# Check for broken versions of make.
# (Allow any version under Cygwin since we don't actually build the platform there.)
ifeq (,$(findstring CYGWIN,$(shell uname -sm)))
ifeq (0,$(shell expr $$(echo $(MAKE_VERSION) | sed "s/[^0-9\.].*//") = 3.81))
ifeq (0,$(shell expr $$(echo $(MAKE_VERSION) | sed "s/[^0-9\.].*//") = 3.82))

ifeq (0,$(shell expr $$(echo $(MAKE_VERSION) | sed "s/[^0-9\.].*//") = 4.21))
$(warning ********************************************************************************)
$(warning *  You are using version $(MAKE_VERSION) of make.)
$(warning *  Android can only be built by versions 3.81 and 3.82.)
$(warning *  see https://source.android.com/source/download.html)
$(warning ********************************************************************************)
#$(error stopping)
endif
endif
endif
endif


 

扫描二维码关注公众号,回复: 8988890 查看本文章
发布了140 篇原创文章 · 获赞 18 · 访问量 30万+

猜你喜欢

转载自blog.csdn.net/wb4916/article/details/104199323