From 8dd1d440acc3c215de99544fea3982a229715551 Mon Sep 17 00:00:00 2001 From: Junyoung-WON Date: Thu, 13 Feb 2025 21:04:21 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20proguard-rules=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 코드 난독화 설정으로, 제네릭 타입 Signature가 소거되어 제네릭 타입을 확인할 수 없는 런타임 에러 발생. - 에러 발생 시점: CallAdapter 반환에 필요한 리턴 타입을 타입 캐스팅 할 때(ApiResultCallAdapterFactory) proguard-rules.pro에서 Signature를 소거 대상에서 제외시키는 규칙 설정하여 문제 해결 --- android/Staccato_AN/app/proguard-rules.pro | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/android/Staccato_AN/app/proguard-rules.pro b/android/Staccato_AN/app/proguard-rules.pro index 8a0dc3d15..d95e691dd 100644 --- a/android/Staccato_AN/app/proguard-rules.pro +++ b/android/Staccato_AN/app/proguard-rules.pro @@ -14,8 +14,10 @@ # Uncomment this to preserve the line number information for # debugging stack traces. --keepattributes SourceFile,LineNumberTable +-keepattributes SourceFile,LineNumberTable,Signature # If you keep the line number information, uncomment this to # hide the original source file name. --renamesourcefileattribute SourceFile \ No newline at end of file +-renamesourcefileattribute SourceFile + +-keepnames, allowobfuscation class com.on.staccato.data.ApiResult