[英]React-native-google-signin - Cannot read property 'number' of undefined
When I implement import { GoogleSignin } from 'react-native-google-signin';
当我
import { GoogleSignin } from 'react-native-google-signin';
实现import { GoogleSignin } from 'react-native-google-signin';
I get this error: Cannot read property 'number' of undefined
我收到此错误:
Cannot read property 'number' of undefined
I have removed node_modules and installed again all dependencies but again I got the same error. 我已经删除了node_modules并再次安装了所有依赖项,但是我又遇到了同样的错误。
Check react native version, as in doc : 检查反应本机版本,如doc所示 :
If you use React Native < v0.40 stick with v0.8.1 (npm install react-native-google-signin@0.8 --save).
如果您将React Native <v0.40坚持使用v0.8.1(npm install react-native-google-signin@0.8 --save)。
If you use React Native < v0.47 stick with v0.10.0 (npm install react-native-google-signin@0.10 --save).
如果您使用React Native <v0.47坚持v0.10.0(npm install react-native-google-signin@0.10 --save)。
Follow the installation guides: Android and iOS 请遵循安装指南: Android和iOS
React has been updated and doesn't include propTypes
. React已更新,并且不包含
propTypes
。 Replace the import statement in GoogleSignIn.ios.js
with below imports: 将
GoogleSignIn.ios.js
的import语句替换为以下导入:
import React, { Component } from 'react';
import PropTypes from 'prop-types';
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.