인프런 커뮤니티 질문&답변
디버그 서명 인증서 SHA-1가 구해지지 않습니다.
작성
·
308
1
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요!
- 먼저 유사한 질문이 있었는지 검색해보세요.
- 서로 예의를 지키며 존중하는 문화를 만들어가요.
- 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요.
파이어베이스 등록할 때 디버그 서명 인증서를 구해야 하는데,
터미널에 명령어를 치면 다음과 같이 나옵니다.
제가 코틀린 강의를 듣고 시험용으로 구글 콘솔에 앱 등록을 한 적이 있는데,
방법을 잘 몰라서 generate app bundle을 여러번 했습니다. 그래서 키가 이상한 걸까요?..
질문은 2가지 입니다.
이럴 경우 어떻게 대처해야 할까요?
파이어베이스 등록할 때 꼭 디버그 서명 인증서를 입력해야 하는건가요?
프로젝트 폴더의 android폴더에서 gradlew signingReport 명령을 실행시키면 Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/selena/AndroidStudioProjects/ipari_gram/android/app/build.gradle' line: 24
* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin 'com.android.internal.application'.
> Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
You can try some of the following options:
- changing the IDE settings.
- changing the JAVA_HOME environment variable.
- changing
org.gradle.java.homeingradle.properties.* 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 8s라고 나옵니다.
키 저장소 비밀번호 입력:
keytool 오류: java.io.IOException: keystore password was incorrect
java.io.IOException: keystore password was incorrect
at sun.security.pkcs12.PKCS12KeyStore.engineLoad(PKCS12KeyStore.java:2059)
at sun.security.provider.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:238)
at sun.security.provider.JavaKeyStore$DualFormatJKS.engineLoad(JavaKeyStore.java:70)
at java.security.KeyStore.load(KeyStore.java:1445)
at sun.security.tools.keytool.Main.doCommands(Main.java:926)
at sun.security.tools.keytool.Main.run(Main.java:366)
at sun.security.tools.keytool.Main.main(Main.java:359)
Caused by: java.security.UnrecoverableKeyException: failed to decrypt safe contents entry: javax.crypto.BadPaddingException: Given final block not properly padded. Such issues can arise if a bad key is used during decryption.
... 7 more
답변 1
1
로그인을 사용하면 sha1 을 등록해야 합니다.
에러메시지에 gradlew signingReport 를 실행하려면 Java11이 필요하다고 나오네요. 현재 Java1.8이 설치되어 있으십니다.
Java11을 설치후에 해 보시면 될 것 같습니다.
선생님 ㅜㅜ java11설치하기를 검색해서 블로그대로 하다가 좀 이상해진 것 같습니다.
M1 맥북을 사용하고 있습니다.
zulu11.60.19를 다운받고 dmg로 설치했습니다. 그리고 환경변수를 설정하라길래 https://blex.me/@DevMinGeonPark/m1-monterey-java-11013-%EC%84%A4%EC%B9%98-%ED%9B%84-%ED%99%98%EA%B2%BD%EB%B3%80%EC%88%98-%EC%84%A4%EC%A0%95%ED%95%98%EA%B8%B0
이 블로그대로 설정을 했는데요.
vim -r /Users/selena/.zshrc 를 칠 경우
Using swap file "~/.zshrc.swp"
Original file "~/.zshrc"
E308: Warning: Original file may have been changed
Recovery completed. Buffer contents equals file contents.
You may want to delete the .swp file now.
Press ENTER or type command to continue
라고 나옵니다 ㅜㅜㅜ 어떻게 해야 할까요?
+++
(base) selena@selenaui-MacBookPro ~ % vim ~/.zshrc
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/selena/opt/anaconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/Users/selena/opt/anaconda3/etc/profile.d/conda.sh" ]; then
. "/Users/selena/opt/anaconda3/etc/profile.d/conda.sh" else
export PATH="/Users/selena/opt/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
export PATH=$PATH:/Users/selena/Documents/flutter/bin
~
~
~
~
~
~
~
"~/.zshrc" [readonly] 15L, 550B
저는 jdk 11 을 다음으로 설치했습니다.
brew 를 안 쓰시면 먼저 brew를 검색해서 설치하신 후에 다음 명령으로 간단히 설치할 수 있습니다.
brew tap mdogan/zulu
brew install zulu-jdk11
vim 사용법을 모르시면 그냥 편하신 편집기로 홈디렉토리의 .zshrc 파일을 오픈하셔서 수정하시면 됩니다.
.zshrc.swp 파일은 강제로 삭제하시면 될 것 같습니다.






java17설치하고 다시 터미널에 gradlew signingReport를 입력하니 또 에러가 납니다...