在Android react-native上运行应用程序时出错

时间:2019-09-06 13:53:39

标签: android react-native expo

我是本机反应的新手,我需要应用程序上的功能。 我已经使用与nvm一起安装的npm安装了expo和react-native,所以不会遇到拒绝权限的问题。

我使用expo运行该应用程序,可以看到第一页,即登录页面,但是一旦按登录,就会出现以下错误:

    TypeError: TypeError: undefined is not an object (evaluating 'theme.label')

This error is located at:
    in HeaderTitle (at Header.tsx:220)
    in RCTView (at View.js:44)
    in AnimatedComponent (at Header.tsx:531)
    in RCTView (at View.js:44)
    in RCTView (at View.js:44)
    in RCTView (at View.js:44)
    in AnimatedComponent (at react-native-safe-area-view/index.js:163)
    in SafeView (at withOrientation.js:54)
    in withOrientation (at Header.tsx:722)
    in RCTView (at View.js:44)
    in AnimatedComponent (at Header.tsx:714)
    in Header (at withOrientation.js:30)
    in withOrientation (at StackViewLayout.tsx:227)
    in RCTView (at View.js:44)
    in RCTView (at View.js:44)
    in AnimatedComponent (at StackViewCard.tsx:106)
    in RCTView (at View.js:44)
    in AnimatedComponent (at screens.native.js:59)
    in Screen (at StackViewCard.tsx:93)
    in Card (at createPointerEventsContainer.tsx:95)
    in Container (at StackViewLayout.tsx:982)
    in RCTView (at View.js:44)
    in ScreenContainer (at StackViewLayout.tsx:394)
    in RCTView (at View.js:44)
    in AnimatedComponent (at StackViewLayout.tsx:384)
    in Handler (at StackViewLayout.tsx:377)
    in StackViewLayout (at withOrientation.js:30)
    in withOrientation (at StackView.tsx:103)
    in RCTView (at View.js:44)
    in Transitioner (at StackView.tsx:40)
    in StackView (at createNavigator.js:81)
    in Navigator (at createKeyboardAwareNavigator.js:12)
    in KeyboardAwareNavigator (at SceneView.js:9)
    in SceneView (at StackViewLayout.tsx:910)
    in RCTView (at View.js:44)
    in AnimatedComponent (at StackViewCard.tsx:106)
    in RCTView (at View.js:44)
    in AnimatedComponent (at screens.native.js:59)
    in Screen (at StackViewCard.tsx:93)
    in Card (at createPointerEventsContainer.tsx:95)
    in Container (at StackViewLayout.tsx:982)
    in RCTView (at View.js:44)
    in ScreenContainer (at StackViewLayout.tsx:394)
    in RCTView (at View.js:44)
    in AnimatedComponent (at StackViewLayout.tsx:384)
    in Handler (at StackViewLayout.tsx:377)
    in StackViewLayout (at withOrientation.js:30)
    in withOrientation (at StackView.tsx:103)
    in RCTView (at View.js:44)
    in Transitioner (at StackView.tsx:40)
    in StackView (at createNavigator.js:81)
    in Navigator (at createKeyboardAwareNavigator.js:12)
    in KeyboardAwareNavigator (at SceneView.js:9)
    in SceneView (at SwitchView.js:12)
    in SwitchView (at createNavigator.js:81)
    in Navigator (at createAppContainer.js:430)
    in NavigationContainer (at App.tsx:31)
    in RCTView (at View.js:44)
    in App (at withExpoRoot.js:22)
    in RootErrorBoundary (at withExpoRoot.js:21)
    in ExpoRootComponent (at renderApplication.js:34)
    in RCTView (at View.js:44)
    in RCTView (at View.js:44)
    in AppContainer (at renderApplication.js:33)

This error is located at:
    in NavigationContainer (at App.tsx:31)
    in RCTView (at View.js:44)
    in App (at withExpoRoot.js:22)
    in RootErrorBoundary (at withExpoRoot.js:21)
    in ExpoRootComponent (at renderApplication.js:34)
    in RCTView (at View.js:44)
    in RCTView (at View.js:44)
    in AppContainer (at renderApplication.js:33)
- node_modules/react-navigation-stack/lib/module/views/Header/HeaderTitle.js:1:2119 in render
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:10563:21 in finishClassComponent
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:14091:21 in performUnitOfWork
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:14129:41 in workLoop
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:14226:15 in renderRoot
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:15193:17 in performWorkOnRoot
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:15090:24 in performWork
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:15047:14 in performSyncWork
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:14925:19 in requestWork
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:14711:16 in scheduleWork
- node_modules/react-native/Libraries/Renderer/oss/ReactNativeRenderer-dev.js:7700:17 in enqueueSetState
- node_modules/react/cjs/react.development.js:364:31 in setState
- node_modules/@react-navigation/native/src/createAppContainer.js:377:22 in dispatch
- node_modules/@react-navigation/core/lib/module/getChildNavigation.js:1:1529 in <unknown>
* screens/auth/SignInScreen.tsx:38:41 in <unknown>
- node_modules/promise/setimmediate/core.js:37:14 in tryCallOne
- node_modules/promise/setimmediate/core.js:123:25 in <unknown>
- node_modules/react-native/Libraries/Core/Timers/JSTimers.js:152:14 in _callTimer
- node_modules/react-native/Libraries/Core/Timers/JSTimers.js:200:17 in _callImmediatesPass
- node_modules/react-native/Libraries/Core/Timers/JSTimers.js:464:30 in callImmediates
* [native code]:null in callImmediates
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:320:6 in __callImmediates
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:135:6 in <unknown>
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:297:10 in __guard
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:134:17 in flushedQueue
* [native code]:null in flushedQueue
* [native code]:null in invokeCallbackAndReturnFlushedQueue

这是package.json

{
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "run:android": "expo start --android",
    "run:ios": "expo start --ios",
    "build:android": "expo build:android",
    "build:ios": "expo build:ios"
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    "@expo/vector-icons": "^10.0.5",
    "@types/expo": "^32.0.0",
    "@types/nanoid": "^2.0.0",
    "@types/react-native": "^0.57.0",
    "@types/react-native-dialog": "^5.5.0",
    "@types/react-native-snap-carousel": "^3.7.2",
    "@types/react-navigation": "^3.0.7",
    "@types/yup": "^0.26.13",
    "axios": "^0.18.0",
    "expo": "^32.0.0",
    "formik": "^1.5.7",
    "nanoid": "^2.0.3",
    "react": "16.5.0",
    "react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
    "react-native-circular-progress": "https://github.com/myuser/react-native-circular-progress.git",
    "react-native-dialog": "^5.6.0",
    "react-native-modal-popover": "^0.0.12",
    "react-native-snap-carousel": "^3.8.0",
    "react-navigation": "^3.0.9",
    "typescript": "^3.3.0",
    "yup": "^0.27.0"
  },
  "devDependencies": {
    "@react-native-community/eslint-config": "^0.0.5",
    "babel-preset-expo": "^5.0.0",
    "eslint": "^5.16.0",
    "eslint-config-prettier": "^4.3.0",
    "eslint-plugin-prettier": "^3.1.0",
    "prettier": "^1.17.1"
  },
  "private": true
}

你能帮我吗?

0 个答案:

没有答案