错误描述:
在使用uni-app开发微信小程序的时候,想要通过uni.chooseLocation获取用户地理位置的时候出现chooseAddress:fail the api need to be declared in the requiredPrivateInfos field in app.json/ext.json这样的错误
解决办法
打开manifest.json选择源码视图,找到mp-weixin节点,添加requiredPrivateInfos的配置,源码如下:
"mp-weixin" : {
"requiredPrivateInfos" : [ "chooseLocation", "getLocation" ,"chooseAddress" ]
}