본문 바로가기

전체 글69

✖ Android SDK - Required for building and installing your app on Android npx @react-native-community/cli doctor 이 코드로 환경설정을 진단 했을 때 아래와 같이 sdk를 다운 받았음에도 이러한 이슈가 있다면 ( 특히 Version supported 의 버전을 컨트롤 하고 싶을 때 ) 프로젝트 파일에서 android -> build.gradle 로 이동하여 버전을 맞춰주자 2022. 7. 17.
error Failed to launch emulator. Reason: No emulators found as an output of `emulator -list-avds`. 리액트 네이티브에서 npx react-native init AwesomeProject 명령어로 RN 셋팅을 하였다. 그리고 안드로이드 스튜디오 셋팅을 마치고 npx react-native run-android를 실행했을 때 아래와 같은 에러가 나온다. error Failed to launch emulator. Reason: No emulators found as an output of `emulator -list-avds`. 이럴 땐 SDK 설치를 다시 확인해보자. 참고로 나는 Setting -> Android SDK -> SDK Platforms 에서 Android SDK Platform 33 과 Android SDK Platform 31 이 중복 설치되어있어서 하나를 삭제해주어 에러를 해결하였다. 2022. 7. 16.
Typescript 컴파일러 및 tsconfig.json 시계(관찰) 모드 ts파일에서 코드를 변경할 때마다 웹페이지에서 변경사항을 반영하고 싶을 때 tsc --watch or tsc -w 전체 컴파일 index.html 에서 script 작성 ex) tsc -init (특정 파일 지정안함) tsconfig.json 생성 확인 tsc -> 컴파일 원하는 파일 제외 후 컴파일 tsconfig.json 에서 exclude 추가 ex) "exclude": ["ananlytics.ts"] // ananlytics.ts 제외 ex) "exclude": ["*.dev.ts"] // dev.ts가 포함된 모든 파일 제외 ex) "exclude": ["**/*.dev.ts"] // 이와 같은 패턴의 파일 제외 [참고] exclude 사용 시 node_modules는 꼭 제외.. 2022. 7. 12.
이상한 문자 만들기 [Javscript] 내가 작성한 코드 function solution(s) { return s.split(" ").map(x=>x.split("").map((str, i)=> i%2===0 ? x[i].toUpperCase():x[i].toLowerCase()).join("")).join(" ") } 2022. 7. 10.
시저 암호 [Javascript] 내가 작성한 코드 function solution(s, n) { const eng_up = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ".split("") const eng_lo = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz".split("") const sSplit = s.split("") const box = sSplit.map(elm=>{ if(eng_up.includes(elm)){ return elm = eng_up[eng_up.indexOf(elm)+n] } if(eng_lo.includes(elm)){ return elm = eng_lo[eng_lo.indexOf(elm)+n] } ret.. 2022. 7. 10.