android 添加gms包-7.0

1.打包步骤
先将解压的partner_gms复制粘贴到vender下面,然后在
device\xxx\xxx\full_xxx_.mk中添加,
#xiaozheng add
BUILD_GMS := yes
注:实际是使device\mediatek\common\device.mk中的
ifdef BUILD_GMS
ifeq ($(strip $(BUILD_GMS)), yes)
$(call inherit-product-if-exists, vendor/google/partner_gms/gms.mk)生效
2.编译报错
vendor/google/apps/WebViewGoogle/Android.mk:21: *** ro.product.first_api_level property is undefined
需要在
vendor\partner_gms\products\gms.mk中添加
#xiaozheng add
PRODUCT_PROPERTY_OVERRIDES += \
ro.product.first_api_level=24 \
注:关联gms.mk文件的语句记得跟实际路径想对应,才能关联上,别搞成了vendor/google/products/gms.mk
device\mediatek\common\device.mk
$(call inherit-product-if-exists, vendor/partner_gms/products/gms.mk)
3.编译报错
ninja: error: 'vendor/partner_gms/etc/preferred-apps/google.xml', needed by 'out/target/product/xxx/system/etc/preferred-apps/google.xml', missing and no known rule to make it
make: *** [ninja_wrapper] 错误 1
vender下面的文件夹命名不能按以前的google了,应该按实际的路径来写为partner_gms
4.开机导航跳不过去,修改vendor/partner_gms/products/gms.mk里面的属性值any改成OPTIONAL
PRODUCT_PROPERTY_OVERRIDES += \
    ro.product.first_api_level=24 \
    ro.setupwizard.require_network=OPTIONAL \
    ro.setupwizard.mode=OPTIONAL \
    ro.com.google.gmsversion=7.0_r7
---------

你可能感兴趣的:(系统开发)