Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 코드 난독화로 인한 앱 종료 에러 수정 #637

Closed
Junyoung-WON opened this issue Feb 13, 2025 · 0 comments · Fixed by #638
Closed

fix: 코드 난독화로 인한 앱 종료 에러 수정 #637

Junyoung-WON opened this issue Feb 13, 2025 · 0 comments · Fixed by #638
Assignees
Labels
android We are android>< fix 버그 (버그 수정) 🥵 hotfix 버그 및 오류 긴급 수정 (모두 모두 붙어라)
Milestone

Comments

@Junyoung-WON
Copy link
Contributor

Junyoung-WON commented Feb 13, 2025

🤮 As Is (오마이갓 비상사태)

어떤 상황에서 발생한 버그인지 설명해주세요. (육하원칙이면 더 좋아요!)

코드 난독화 설정으로 인해 기존 타입들이 모두 랜덤한 타입 이름으로 매핑됩니다.
이로 인해, 적절한 CallAdapter를 장착하기 위해 반환 타입을 확인하는 과정에서(returnType as ParameterizedType),
타입 캐스팅 예외로 인해 앱이 바로 종료됩니다.

🤬 To Be

버그가 없었다면 어떻게 동작해야 하는지 설명해주세요.

잘 동작합니다.

😇 이때까지 끝낼게요!

버그 해결 예상 날짜를 작성해주세요. 신중하게 생각해요!

당장.

😵 참고 자료(선택)

@Junyoung-WON Junyoung-WON added android We are android>< fix 버그 (버그 수정) 🥵 hotfix 버그 및 오류 긴급 수정 (모두 모두 붙어라) labels Feb 13, 2025
@Junyoung-WON Junyoung-WON added this to the sprint-9 milestone Feb 13, 2025
@Junyoung-WON Junyoung-WON changed the title fix: 리소스 축소로 인한 앱 종료 에러 수정 fix: 코드 난독화로 인한 앱 종료 에러 수정 Feb 13, 2025
Junyoung-WON added a commit that referenced this issue Feb 13, 2025
코드 난독화 설정으로, 제네릭 타입 Signature가 소거되어 제네릭 타입을 확인할 수 없는 런타임 에러 발생.
- 에러 발생 시점: CallAdapter 반환에 필요한 리턴 타입을 타입 캐스팅 할 때(ApiResultCallAdapterFactory)

proguard-rules.pro에서 Signature를 소거 대상에서 제외시키는 규칙 설정하여 문제 해결
@hxeyexn hxeyexn closed this as completed Feb 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android We are android>< fix 버그 (버그 수정) 🥵 hotfix 버그 및 오류 긴급 수정 (모두 모두 붙어라)
Projects
Status: Done
2 participants