React Native

[Reac Native] What went wrong: A problem occurred evaluating project ':react-native-reanimated'.

mSubWay 2024. 11. 13. 11:18

 

node_modules에 설치된 react-native-reanimated/android 폴더에 있는 build.gradle 수정

// 기존 코드
if ((REACT_NATIVE_MINOR_VERSION >= 71 && appProject?.hermesEnabled?.toBoolean()) || appProject?.ext?.react?.enableHermes?.toBoolean()) {
   return "hermes"
}


// 변경 코드
if (REACT_NATIVE_MINOR_VERSION >= 71 || appProject?.ext?.react?.enableHermes?.toBoolean()) {
   return "hermes"
}

 

위에 수정하고 빌드했더니 다른 라이브러리도 비슷한 오류가 나와 수정해주었다.

 

node_modules에 설치된 react-native-visioin-camera/android 폴더에 있는 build.gradle 수정

// 기존 코드
if (project.plugins.hasPlugin("com.android.application")) {
  FOR_HERMES = REACT_NATIVE_VERSION >= 71 && project.hermesEnabled || project.ext.react.enableHermes
}


// 변경 코드
if (project.plugins.hasPlugin("com.android.application")) {
  FOR_HERMES = REACT_NATIVE_VERSION >= 71 || project.ext.react.enableHermes
}

 

 

하아.... 라이브러리를 직접 고쳐쓰다니..... 오픈소스.... 참 어렵다....... ;;;;