[英]Expo push notifications - Error: Couldn’t get GCM token for device
i try to implement Expo Notification on mt app, very wired, in my last expo app it work well but now it's doesn't, maybe because the versions update this is show when i try the code from expo documentation 我尝试在mt应用程序上实现世博通知,非常有线,在我的上一个世博会应用程序中运行良好,但现在它没有,可能是因为版本更新这是显示当我尝试从expo文档的代码
Error: Couldn't get GCM token for device
and this is the pacage.json: 这是pacage.json:
My package.json: 我的package.json:
{
"name": "blabla",
"version": "0.1.0",
"private": true,
"devDependencies": {
"babel-plugin-transform-decorators-legacy": "^1.3.5",
"jest-expo": "~27.0.0",
"react-native-scripts": "1.14.0",
"react-test-renderer": "16.3.1"
},
"main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
"scripts": {
"start": "react-native-scripts start",
"eject": "react-native-scripts eject",
"android": "react-native-scripts android",
"ios": "react-native-scripts ios",
"test": "jest"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"es6-symbol": "^3.1.1",
"expo": "^29.0.0",
"firebase": "^5.4.1",
"mobx": "^4.3.1",
"mobx-react": "^5.1.0",
"react": "16.3.1",
"react-native": "~0.55.2",
"react-native-animatable": "^1.3.0",
"react-native-ionicons": "^0.2.2",
"react-native-progress": "^3.5.0",
"react-native-simple-toast": "0.0.8",
"react-navigation": "^2.11.0"
}
}
Just fixed it by using expo start instead of react-natives-scripts start . 只是通过使用expo start而不是react-natives-scripts启动来修复它。 If u get expo-cli error, run npm install expo-cli --global .
如果你得到expo-cli错误,请运行npm install expo-cli --global 。
You can find more discussion related to this error here 您可以在此处找到与此错误相关的更多讨论
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.