rn프로젝트에서 android를 build하는 도중 다음 에러가 발생했다.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:installDebug'.
> com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: INSTALL_FAILED_INVALID_APK: Scanning Failed.: Package /data/app/~~YY_my0fxBMNxQlJsEoD7JQ==/com.front_rn-mHS9fU0o3_unMF4bRWCU_A==/base.apk code is missing
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 17s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
Unable to install C:\Users\user\momo\wellwork\front\android\app\build\outputs\apk\debug\app-debug.apk
이는 에뮬레이터에서 전에 설치해논 앱을 다시 설치하려고 할 때 발생하는 에러라 한다.
How to fix INSTALL_FAILED_INVALID_APK error in Android Studio?에 나와 있는 해결방법 중
../android/app/build/outputs/apk/debug/app-debug.apk
파일을 지워 해결했다.
감사합니다