Android 7.0添加GMS包后,编译时会出现WebViewGoogle报错:
ro.product.first_api_level property is undefined
这行log出自脚本文件:
\vendor\google\apps\WebViewGoogle\Android.mk
# make sure to include correct WebView binary: full or stub
_list_of_old_api_levels := 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
ifneq (,$(filter $(PLATFORM_SDK_VERSION),$(_list_of_old_api_levels)))
# WebView apks in this folder are for N or later platforms only, stop building
$(error PLATFORM_SDK_VERSION must be equal to or greater than 24)
endif
_ro_property_string := $(filter ro.product.first_api_level=%,$(ADDITIONAL_BUILD_PROPERTIES))
ifdef _ro_property_string
_first_api_level := $(word 2,$(subst =,$(space),$(_ro_property_string)))
else
# if the first_api_level property is undefined, stop building
$(error ro.product.first_api_level property is undefined)
endif
如上脚本倒数第二行,即是log出处。
解决办法:
在 _ro_property_string 那行脚本上面插入新脚本:
ADDITIONAL_BUILD_PROPERTIES += ro.product.first_api_level=24
_ro_property_string := $(filter ro.product.first_api_level=%,$(ADDITIONAL_BUILD_PROPERTIES))
网友评论