-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
大佬 RN0.61.3版本定位没反应呀 是不支持吗? #109
Comments
我是0.61.2, 同样也是没有反应,也不报错 export class DeviceAdd extends Component {
} const mapStateToProps = (state) => ({ }) const mapDispatchToProps = { } export default connect(mapStateToProps, mapDispatchToProps)(DeviceAdd) |
我的已经解决了 是我自己的问题 你可以参考下作者的index.js写的例子 另外我还有个原因是申请的高德key填的调试版的安全码填错了 我之前用的是全局的一个debug证书 后来发现项目安卓根目录下有个debug证书 修改了就可以获取到坐标了 仅供参考。 |
为了节省大家的时间,请尽可能详细地说明问题,并最好提供截图(特别是出错信息)。
async componentDidMount() {
// 对于 Android 需要自行根据需要申请权限
await PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.ACCESS_COARSE_LOCATION);
// 使用自己申请的高德 App Key 进行初始化
await init({
android: "eb09390e79f2d193b680752576045041"
});
Geolocation.getCurrentPosition(({ coords }) => {
console.log(1223)
console.log(coords);
});
}
已经解决 是自己的问题
The text was updated successfully, but these errors were encountered: