我是一个新手,对andorid开发人员和react-native-device-info。当我使用react-native-device-info函数DeviceInfo.getPhoneNumber()获取电话号码,但它没有返回任何信息时,当我转到deviceinfo.d.ts查找getPhoneNumber()时,我的react-native-device-info是"version":"0.12.1"enter image description here
发布于 2017-11-21 20:15:57
也许你只需要更新你的AndroidManifest.xml,添加这个权限?
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
来源:https://github.com/rebeccahughes/react-native-device-info#permissions
https://stackoverflow.com/questions/47408867
复制相似问题