Android can only be built by versions 3.81 and 3.82--解决方法

  • 在编译旧版本[4.0]项目时报这个问题[Android can only be built by versions 3.81 and 3.82],参考了网上的解决方法,并不是很有效;有个更加直接的方法,把当前对于版本筛选的代码直接注释掉。然后编译。运行,编译成功。

解决方法

  • 修改 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))
# $(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

你可能感兴趣的:(Android)