[ 작업 환경 ]
[ 문제 상황 ]
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.10.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
56 actionable tasks: 56 executed
info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:validateSigningDebug'.
> Keystore file '/Users/owner/Documents/work/rn/coin_diff/android/app/debug.keystore' not found for signing config 'debug'.
* 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 45s
info Run CLI with --verbose flag for more details.
info Stopping server
[ 해결 방법 ]
1. debug.keystore 파일 생성
// Terminal에서 커맨드 입력해 "debug.keystore" 파일 생성
keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000
2. android/app 경로에 생성된 debug.keystore 파일 이동 및 해당 파일을 복제하여 my-release-key.keystore 파일 생성
3. android/gradle.properties 파일 수정
// android/gradle.properties
// ...
MYAPP_RELEASE_STORE_FILE=my-release-key.keystore
MYAPP_RELEASE_KEY_ALIAS=my-key-alias
MYAPP_RELEASE_KEY_PASSWORD=hahahoho1234!!
MYAPP_RELEASE_STORE_PASSWORD=hahahoho1234!!
4. android/app/build.gradle 파일에서 2군데 수정
// android/app/build.gradle
// ...
release {
if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
storeFile file(MYAPP_RELEASE_STORE_FILE)
storePassword MYAPP_RELEASE_STORE_PASSWORD
keyAlias MYAPP_RELEASE_KEY_ALIAS
keyPassword MYAPP_RELEASE_KEY_PASSWORD
}
}
// ...
signingConfig signingConfigs.release
// ...
[ 문제 해결 완료 확인 ]
1. 빌드 시도
// 빌드 시도
npm start
a
2. 빌드 정상 완료 확인