美文网首页
[Mtk][N0][GMS] Android7.0添加GMS包W

[Mtk][N0][GMS] Android7.0添加GMS包W

作者: 灰灰手记 | 来源:发表于2017-04-26 14:32 被阅读278次

    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))
    

    相关文章

      网友评论

          本文标题:[Mtk][N0][GMS] Android7.0添加GMS包W

          本文链接:https://www.haomeiwen.com/subject/zhlizttx.html