我正在使用Expo创建一个本机应用程序。在IOS设备上运行时,它显示错误,但在android设备中不显示。我在项目中没有使用任何Notification东西。仍然显示该错误。
过去,我尝试过几种克服方法,但是没有用。
App.json
"expo": {
"name": "davinci",
"slug": "davinci",
"privacy": "public",
"sdkVersion": "32.0.0",
"platforms": [
"ios",
"android"
],
"android":{
"package":"com.visualbi.davinci"
},
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/visualbi_logo.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.visualbi.davinci"
}
}
}
package.json
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"eject": "expo eject",
"android": "expo start --android",
"ios": "expo start --ios"
},
"dependencies": {
"expo": "^32.0.0",
"firebase": "^6.0.1",
"json-bigint": "^0.3.0",
"react": "16.5.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
"react-native-datepicker": "^1.7.2",
"react-native-elements": "^1.1.0",
"react-native-exit-app": "^1.0.0",
"react-native-modal": "^11.0.1",
"react-native-ratings": "^6.3.1",
"react-native-rn-toast": "^1.0.0",
"react-native-router-flux": "^4.0.6",
"react-native-scrollable-tab-view": "^0.10.0",
"react-native-simple-dialogs": "^1.1.0",
"react-native-tab-view": "^2.2.0",
"react-navigation": "^3.9.1",
"react-navigation-drawer": "^1.2.1",
"rn-viewpager": "^1.2.9"
},
"devDependencies": {
"babel-preset-expo": "^5.0.0"
},
"private": true
}
打开应用程序本身时,它会显示错误
“ TypeError:未定义不是对象(正在评估'exp.notification')。
谢谢。