[ React-Native CLI ] 설치후 Build 안되는 에러해결 방법
·
Error
react-native 0.72.6 버젼을 다음과 같이 설치했다.npx react-native@0.72.6 init --version 0.72.6설치이후에 프로젝트를 맥북에서 ios로 실행을 시켰는데 멈춘 코드지점Command line invocation: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace tttt.xcworkspace -configuration Debug -scheme tttt -destination id=26AFEFAB-4891-476B-A3A7-345D1AB17C5FUser defaults from command line: IDEPackageSupportUseBuiltinSCM = YESPr..
[ React-Native CLI ] 개발 오류 ❗️Execution failed for task ':react-native-safe-area-context:compileDebugKotlin'.
·
Error
2024.12.24 일에 발생한 오류❗️핵심 오류 문구Execution failed for task ':react-native-safe-area-context:compileDebugKotlin'.A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkActionCompilation error. See log for more details❗️진행도중의 오류 문항info Opening the app on Android...info JS server already running.info Installing the app...> Task :g..
React-Native expo에서 FAB 버튼 만들기
·
Stack/React-Native
FAB 버튼이란?우측 하단에 있는 조그마한 버튼을 일반적으로 "Floating Action Button" (FAB) 이라고 칭한다.추가 이동같은 간단한 작업할때 주로 사용.FAB 버튼 코드import { Alert, StyleSheet, Text, TouchableOpacity } from 'react-native';const FAB: React.FC = () => { const AddLocationListAlert = () => { Alert.prompt(//제목 , // 내용 , [ { text: 'Cancel', onPress: () => { // 취소시 작동하는것 }, style: 'cancel', },..
React-Native 에서 TextInput 사용해보기
·
Stack/React-Native
multiline : 멀티라인을 가능하게해준다.secureTextEntry : TextInput 요소의 값을 비밀번호로 보여준다.returnKeyType="send" : 키보드 자판의 enter를 다르게 보여줌 ⇒ 안드로이드의 경우 더 많고 다르게 보여줄 수 있음keyboardType=? 키보드 타입을 정해준다.autoCapitalize={'sentences'} : 자동완성기능 여부 선택onSubmitEditing={addToDo} : return 눌럿을때 동작시키기onChangeText={onChangeText} : 텍스트 변경시 동작하는 함수value={text} : TextInput의 값placeholder={} : 뒤에 보이게하는 값styles설정input: { backgroundColor: '..
React-Native expo 시작하기 (새버전)
·
Stack/React-Native
리액트 네이티브를 처음하다 새롭게 프로젝트를 시작하면서 생기는 터미널에서 코드가 있었다.expo init 다음으로 시작하는 방법은 옛날방법이라는 것이다.1) 프로젝트 시작하기npx create-expo-app@latest 다음 명령어를 입력하면 최신판의 react-native로 바로 실행된다.2) 프로젝트 실행하기npx expo start다음 명령어를 치면 바로 프로젝트로 실행된다.빈 탬플릿으로 시작하기다음과 같이 프로젝트가 실행되는데 만약에 빈 탬플릿을 원한다면# 기본 빈 템플릿npx create-expo-app@latest MyNewApp --template blank# TypeScript를 사용하는 빈 템플릿npx create-expo-app@latest MyNewApp --template blan..
React-Native 커스텀 폰트 설치하기
·
Stack/React-Native
1) 폰트 파일 준비먼저, 사용할 폰트 파일(예: .ttf 또는 .otf)을 프로젝트에 추가한다. assets/fonts 폴더를 만들고 그 안에 폰트 파일을 넣는게 일반적이다.2) expo-font 패키지 설치expo install expo-font3) 사용하는 폰트 선언export default function App() { const [fontsLoaded] = useFonts({ JUA: require('./assets/fonts/BMJUA_otf.otf'), });}const styles = StyleSheet.create({ fonts: { fontFamily: 'JUA', }});이런식으로 사용하면 된다.