SDK 2.0으로 업데이트 후에 카카오로그인은 정상적으로 되지만,
사용자 정보 요청 시에 “NoSuchFieldException: AGE_0_9” 오류가 반복되고 있습니다.
제가 뭔가 빠뜨린게 있을까요?
[프로그램 코드]
UserApiClient.instance.me { user, error ->
if (error != null) {
Log.e(TAG, “사용자 정보 요청 실패”, error)
}
else if (user != null) {
Log.i(TAG, “사용자 정보 요청 성공” +
"\n회원번호: ${user.id}" +
"\n이메일: ${user.kakaoAccount?.email}" +
"\n닉네임: ${user.kakaoAccount?.profile?.nickname}" +
"\n프로필사진: ${user.kakaoAccount?.profile?.thumbnailImageUrl}")
}
}
[오류 내용]
java.io.IOException: java.lang.NoSuchFieldException: AGE_0_9
at com.kakao.sdk.common.json.KakaoEnumTypeAdapter.read(KakaoTypeAdapterFactory.kt:186)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222)
at retrofit2.converter.gson.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:40)
at retrofit2.converter.gson.GsonResponseBodyConverter.convert(GsonResponseBodyConverter.java:27)
at retrofit2.OkHttpCall.parseResponse(OkHttpCall.java:243)
at retrofit2.OkHttpCall$1.onResponse(OkHttpCall.java:153)
at okhttp3.RealCall$AsyncCall.execute(RealCall.java:174)
at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:919)
Caused by: java.lang.NoSuchFieldException: AGE_0_9
at java.lang.Class.getField(Class.java:1604)
at com.kakao.sdk.common.json.KakaoEnumTypeAdapter.read(KakaoTypeAdapterFactory.kt:169)