인프런 커뮤니티 질문&답변

피카님의 프로필 이미지
피카

작성한 질문수

맛집 지도앱 만들기 (React Native + NestJS)

[2-5] Drawer Navigation

강사님 안녕하세요 질문 있습니다.

작성

·

74

·

수정됨

0

질문 작성시 꼭 참고해주세요

  • 현재 문제(또는 에러)와 코드(또는 github)를 첨부해주세요.

     

  • 맥/윈도우, 안드로이드/iOS, ReactNative, Node 버전 등의 개발환경을 함께 적어주시면 도움이 됩니다.

     

  • 에러메세지는 일부분이 아닌 전체 상황을 올려주세요. (

    일부만 자르거나 복사하지말아주세요.)

     

  • 개발환경/코드에 대한 정보가 없을경우 답변이 어렵습니다.

 

 

강사님 안녕하세요.

지금 mac m3환경에서 개발중입니다.

react-native 버젼 : 0.72.6

 

현재 [2-5] Drawer Navigation을 수강중인데요,
아이폰은 빌드 성공했는데 안드로이드에서 계속 빌드가 실패하고 있습니다.

gpt에게 한번 질문을 해보니 버전을 올리라고하더라구요.

그럼 기존에 맞춰놓은 것들이 깨질까봐 걱정되어서 질문드립니다.

어떻게 하면좋을까요?

 

 터미널:


info 💡 Tip: Make sure that you have set up your development environment correctly, by running react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor 

/Users/rengoku/Documents/projects/Matzip/front/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:440: error: switch rules are not supported in -source 11
      case "opacity" -> {
                     ^
  (use -source 14 or higher to enable switch rules)
/Users/rengoku/Documents/projects/Matzip/front/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java:356: error: pattern matching in instanceof is not supported in -source 11
      if (props.get(Snapshot.TRANSFORM_MATRIX) instanceof ReadableNativeArray matrixArray) {
                                                                              ^
  (use -source 16 or higher to enable pattern matching in instanceof)
2 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-reanimated:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 3s
info Run CLI with --verbose flag for more details.

 

 

버전 정보입니다.

"dependencies": {
    "@react-native-masked-view/masked-view": "^0.3.2",
    "@react-navigation/drawer": "^7.0.5",
    "@react-navigation/native": "^7.0.3",
    "@react-navigation/stack": "^7.0.3",
    "react": "18.2.0",
    "react-native": "0.72.6",
    "react-native-gesture-handler": "^2.21.2",
    "react-native-reanimated": "^3.16.1",
    "react-native-safe-area-context": "^4.14.0",
    "react-native-screens": "^4.1.0"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0",
    "@babel/preset-env": "^7.20.0",
    "@babel/runtime": "^7.20.0",
    "@react-native/eslint-config": "^0.72.2",
    "@react-native/metro-config": "^0.72.11",
    "@tsconfig/react-native": "^3.0.0",
    "@types/react": "^18.0.24",
    "@types/react-test-renderer": "^18.0.0",
    "babel-jest": "^29.2.1",
    "eslint": "^8.19.0",
    "jest": "^29.2.1",
    "metro-react-native-babel-preset": "0.76.8",
    "prettier": "^2.4.1",
    "react-test-renderer": "18.2.0",
    "typescript": "4.8.4"
  },
  "engines": {
    "node": ">=16"
  }

답변 1

0

Kyo님의 프로필 이미지
Kyo
지식공유자

react-native-reanimated 버전을 3.3.0 으로 해보시겠어요?

피카님의 프로필 이미지
피카
질문자

강사님 빠른 답변 감사드립니다.

패키지를 변경하고 다시 실행해보았는데요~

이제 빌드는 100% 까지 진행되고

아래와 같은 오류가 발생합니다~!

 

 ERROR  TypeError: Cannot read property 'Never' of undefined

This error is located at:
    in Drawer (created by DrawerViewBase)
    in DrawerViewBase (created by DrawerView)
    in RNCSafeAreaProvider (created by SafeAreaProvider)
    in SafeAreaProvider (created by SafeAreaProviderCompat)
    in SafeAreaProviderCompat (created by DrawerView)
    in DrawerView (created by DrawerNavigator)
    in PreventRemoveProvider (created by NavigationContent)
    in NavigationContent
    in Unknown (created by DrawerNavigator)
    in DrawerNavigator (created by MainDrawerNavigator)
    in MainDrawerNavigator (created by RootNavigator)
    in RootNavigator (created by App)
    in ThemeProvider
    in EnsureSingleNavigator
    in BaseNavigationContainer
    in NavigationContainerInner (created by App)
    in App
    in RCTView (created by View)
    in View (created by AppContainer)
    in RCTView (created by View)
    in View (created by AppContainer)
    in AppContainer
    in Matzip(RootComponent), js engine: hermes
 ERROR  TypeError: Cannot read property 'Never' of undefined

This error is located at:
    in Drawer (created by DrawerViewBase)
    in DrawerViewBase (created by DrawerView)
    in RNCSafeAreaProvider (created by SafeAreaProvider)
    in SafeAreaProvider (created by SafeAreaProviderCompat)
    in SafeAreaProviderCompat (created by DrawerView)
    in DrawerView (created by DrawerNavigator)
    in PreventRemoveProvider (created by NavigationContent)
    in NavigationContent
    in Unknown (created by DrawerNavigator)
    in DrawerNavigator (created by MainDrawerNavigator)
    in MainDrawerNavigator (created by RootNavigator)
    in RootNavigator (created by App)
    in ThemeProvider
    in EnsureSingleNavigator
    in BaseNavigationContainer
    in NavigationContainerInner (created by App)
    in App
    in RCTView (created by View)
    in View (created by AppContainer)
    in RCTView (created by View)
    in View (created by AppContainer)
    in AppContainer
    in Matzip(RootComponent), js engine: hermes
피카님의 프로필 이미지
피카

작성한 질문수

질문하기