인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

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

코딩노잼님의 프로필 이미지
코딩노잼

작성한 질문수

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

[2-0] 핵심 컴포넌트 및 스타일

안드로이드용으로 npm start 했을 때 빌드에 실패함.

작성

·

100

0

최대한 강의에서 나온대로 했지만, 계속 npm start에서 문제가 일어납니다.

 

환경변수랑, npm start 당시에 Pixel 5 API 33을 켜둔 상태였습니다... 계속 안되니깐 화가 나네요

로그는 다음과 같습니다.

C:\Users\sc003\Desktop\Visual Stdio code\Matzip>npm start

> Matzip@0.0.1 start

> react-native start

(node:9660) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.

(Use node --trace-deprecation ... to show where the warning was created)

Welcome to Metro v0.76.8

Fast - Scalable - Integrated

r - reload the app

d - open developer menu

i - run on iOS

a - run on Android

info Opening the app on Android...

info JS server already running.

info Launching emulator...

info Installing the app...

> Task :gradle-plugin:compileKotlin UP-TO-DATE

> Task :gradle-plugin:compileJava NO-SOURCE

> Task :gradle-plugin:pluginDescriptors UP-TO-DATE

> Task :gradle-plugin:processResources UP-TO-DATE

> Task :gradle-plugin:classes UP-TO-DATE

> Task :gradle-plugin:jar UP-TO-DATE

> Task :gradle-plugin:inspectClassesForKotlinIC UP-TO-DATE

> Task :app:buildCodegenCLI SKIPPED

> Task :app:generateCodegenSchemaFromJavaScript SKIPPED

> Task :app:generateCodegenArtifactsFromSchema SKIPPED

> Task :app:generatePackageList

> Task :app:preBuild

> Task :app:preDebugBuild

> Task :app:compileDebugAidl NO-SOURCE

> Task :app:compileDebugRenderscript NO-SOURCE

> Task :app:generateDebugBuildConfig UP-TO-DATE

> Task :app:javaPreCompileDebug UP-TO-DATE

> Task :app:checkDebugAarMetadata UP-TO-DATE

> Task :app:generateDebugResValues UP-TO-DATE

> Task :app:mapDebugSourceSetPaths UP-TO-DATE

> Task :app:generateDebugResources UP-TO-DATE

> Task :app:mergeDebugResources UP-TO-DATE

> Task :app:createDebugCompatibleScreenManifests UP-TO-DATE

> Task :app:extractDeepLinksDebug UP-TO-DATE

> Task :app:processDebugMainManifest UP-TO-DATE

> Task :app:processDebugManifest UP-TO-DATE

> Task :app:processDebugManifestForPackage UP-TO-DATE

> Task :app:processDebugResources UP-TO-DATE

> Task :app:compileDebugJavaWithJavac UP-TO-DATE

> Task :app:mergeDebugShaders UP-TO-DATE

> Task :app:compileDebugShaders NO-SOURCE

> Task :app:generateDebugAssets UP-TO-DATE

> Task :app:mergeDebugAssets UP-TO-DATE

> Task :app:compressDebugAssets UP-TO-DATE

> Task :app:processDebugJavaRes NO-SOURCE

> Task :app:mergeDebugJavaResource UP-TO-DATE

> Task :app:checkDebugDuplicateClasses UP-TO-DATE

> Task :app:desugarDebugFileDependencies UP-TO-DATE

> Task :app:mergeLibDexDebug UP-TO-DATE

> Task :app:dexBuilderDebug UP-TO-DATE

> Task :app:mergeProjectDexDebug UP-TO-DATE

> Task :app:mergeDebugJniLibFolders UP-TO-DATE

> Task :app:mergeDebugNativeLibs UP-TO-DATE

> Task :app:stripDebugDebugSymbols UP-TO-DATE

> Task :app:validateSigningDebug UP-TO-DATE

> Task :app:writeDebugAppMetadata UP-TO-DATE

> Task :app:writeDebugSigningConfigVersions UP-TO-DATE

> Task :app:mergeExtDexDebug UP-TO-DATE

> Task :app:packageDebug UP-TO-DATE

> Task :app:createDebugApkListingFileRedirect UP-TO-DATE

> Task :app:installDebug

Installing APK 'app-debug.apk' on 'Pixel_5_API_33(AVD) - 13' for :app:debug

Installed on 1 device.

BUILD SUCCESSFUL in 8s

38 actionable tasks: 2 executed, 36 up-to-date

info Connecting to the development server...

info Starting the app...

Error: Command failed with exit code 1: adb shell am start -n com.matzip/com.matzip.MainActivity -a android.intent.action.MAIN -c android.intent.category.LAUNCHER

at makeError (C:\Users\sc003\Desktop\Visual Stdio code\Matzip\node_modules\execa\lib\error.js:60:11)

at module.exports.sync (C:\Users\sc003\Desktop\Visual Stdio code\Matzip\node_modules\execa\index.js:194:17)

at tryLaunchAppOnDevice (C:\Users\sc003\Desktop\Visual Stdio code\Matzip\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\tryLaunchAppOnDevice.js:47:22)

at C:\Users\sc003\Desktop\Visual Stdio code\Matzip\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:96:39

at Array.forEach (<anonymous>)

at runOnAllDevices (C:\Users\sc003\Desktop\Visual Stdio code\Matzip\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:91:48)

at process.processTicksAndRejections (node:internal/process/task_queues:105:5)

at async Command.handleAction (C:\Users\sc003\Desktop\Visual Stdio code\Matzip\node_modules\@react-native-community\cli\build\index.js:111:9)

info Run CLI with --verbose flag for more details.

Matzip 폴더에 android > app > src > AndroidMainfest.xml 에

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.matzip">

이런식으로 넣어두었는데도 안됩니다..

답변 2

0

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

BUILD SUCCESSFUL in 8s

빌드가 실패한것이 아니라, 빌드에성공했고 이부분에 에러가 발생하고있네요.

Error: Command failed with exit code 1

노드모듈을 지우고 캐시도 삭제후 재설치하고 다시 시도해보시겠어요?

코딩노잼님의 프로필 이미지
코딩노잼
질문자

노드 모듈을 삭제한 이후 npm cache clean --force

을 했습니다. 이후 npm install을 해서 재설치를 했습니다.

그 다음 npm start를 하고 안드로이드를 선택했는데,


BUILD SUCCESSFUL in 10s

38 actionable tasks: 2 executed, 36 up-to-date

info Connecting to the development server...

info Starting the app...

Error: Command failed with exit code 1: adb shell am start -n com.matzip/com.matzip.MainActivity -a android.intent.action.MAIN -c android.intent.category.LAUNCHER

at makeError (C:\Users\sc003\Desktop\Visual Stdio code\Matzip\node_modules\execa\lib\error.js:60:11)

at module.exports.sync (C:\Users\sc003\Desktop\Visual Stdio code\Matzip\node_modules\execa\index.js:194:17)

at tryLaunchAppOnDevice (C:\Users\sc003\Desktop\Visual Stdio code\Matzip\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\tryLaunchAppOnDevice.js:47:22)

at C:\Users\sc003\Desktop\Visual Stdio code\Matzip\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:96:39

at Array.forEach (<anonymous>)

at runOnAllDevices (C:\Users\sc003\Desktop\Visual Stdio code\Matzip\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:91:48)

at process.processTicksAndRejections (node:internal/process/task_queues:105:5)

at async Command.handleAction (C:\Users\sc003\Desktop\Visual Stdio code\Matzip\node_modules\@react-native-community\cli\build\index.js:111:9)

info Run CLI with --verbose flag for more details.
이런식으로 뜹니다..ㅠ

코딩노잼님의 프로필 이미지
코딩노잼
질문자

kyo님 아니면, 리액트 네이티브 CLI 환경으로 말고, expo로 진행해도 괜찮나요? CLI로 계속 환경 세팅으로 막히니 답답합니다

0

코딩노잼님의 프로필 이미지
코딩노잼
질문자

디벨롭 os는 window이고 타겟 os는 안드로이드입니다

코딩노잼님의 프로필 이미지
코딩노잼

작성한 질문수

질문하기