1.修改
frameworks/base/core/res/res/values/config.xml 文件中
中
<string name="config_networkLocationProviderPackageName" translatable="false">@null</string>
為
<string name="config_networkLocationProviderPackageName" translatable="false">com.amap.android.location</string>
修改相同文件下
<string name="config_geocoderProviderPackageName" translatable="false">@null</string>
為
<string name="config_geocoderProviderPackageName" translatable="false">com.amap.android.location</string>
3.在相同文件下
<string-array name="config_locationProviderPackageNames" translatable="false">
<!-- The standard AOSP fused location provider -->
<item>com.android.location.fused</item>
<!-- MTK add for GMS -->
<item>com.google.android.gms</item>
<item>com.baidu.map.location</item>
<!-- MTK add end -->
</string-array>
修改為
<string-array name="config_locationProviderPackageNames" translatable="false">
<item>com.amap.android.location</item>
</string-array>
然后將這個apk內(nèi)置到系統(tǒng)下,系統(tǒng)定位就可用了徙邻。