모바일 앱37 [React Native] Execution failed for task ':app:checkDebugAarMetadata'. 앱 빌드하는 과정에서 아래 사진과 같은 에러가 발생했습니다. 프로젝트 폴더에 /android/app/build.gradle 로 들어가서 allprojects 내부를 다음과 같이 수정해줍니다. allprojects { repositories { ... mavenCentral() mavenLocal() jcenter() ... } } 저같은 경우는 jcenter()가 없어서 발생한 버그였습니다. 참고 https://stackoverflow.com/a/68841906/15458307 Error when trying to run my React Native app on Android I've built my React Native app and tested and troubleshooted with my iOS.. 2021. 9. 5. [React Native] iOS Simulator, Device에서 Debug menu가 열리지 않는 경우 오늘 iOS 빌드를 하다가 debug menu가 열리지 않는 현상이 발생했습니다. ios device를 흔들고, cmd+D 버튼을 눌렀음에도 debug menu가 열리지 않아 이 현상에 대해 찾아보았습니다. xcode에 들어가 edit scheme 버튼을 누르면 다음과 같은 창이 뜨는데요, Build Configuration 부분이 Debug로 되어 있는지 확인해보아야 합니다. 저 같은 경우는 이 부분이 release로 되어 있어서 디버그 메뉴가 열리지 않았습니다. 참고 https://github.com/facebook/react-native/issues/25246#issuecomment-502407014 can not open developer menu , iOS · Issue #25246 · face.. 2021. 8. 23. [React Native] Jest / TypeError: Cannot read property 'SHORT' of undefined React Native에서 Jest를 이용한 테스트를 진행하던 중 아래와 같은 오류가 발생했습니다. 테스트 코드는 아래와 같은데요, 간단한 snapshot 테스트를 실행하는 코드입니다. import 'react-native'; import React from 'react'; import renderer from 'react-test-renderer'; import Quiz from '../src/components/screen/Quiz'; it('snapshot test', () => { const tree = renderer.create().toJSON(); expect(tree).toMatchSnapshot(); }); Quiz 컴포넌트에서 SimpleToast라는 모듈을 import하게 되면서 생긴.. 2021. 8. 20. [React Native] Jest / SyntaxError: Cannot use import statement outside a module Jest 사용 중 import문 쪽에서 이슈가 발생했습니다. package.json에 아래 문장을 추가해주니 해결이 되었습니다. "jest": { ... "transformIgnorePatterns": [ "node_modules/(?!react-native|react-navigation)/" ] ... } 이후 terminal에서 yarn test 명령어 실행 시 캐시를 지우고 실행을 해주어야 적용이 되는 것 같습니다. yarn test --no-cache 참고 https://github.com/facebook/jest/issues/11591#issuecomment-899508417 Jest encountered an unexpected token · Issue #11591 · facebook/jest.. 2021. 8. 18. 이전 1 2 3 4 5 ··· 10 다음