안녕하세요.
앱의 간단한 텍스트 내용을 카카오톡으로 친구에게 날리는 기능을 구현하려고 하는데요,
계속 ExceptionInInitializerError가 나오는 문제가 발생해서 어떤 기능도 테스트를 못하고 있습니다.
앱은 cordova 기반으로 구현되어있고 gradle을 이용해서 내부에 sdk 1.9.0으로 설치하였고 네이티브쪽에서 코드를 구현해서 동작을 시키려고 하고 있는 중입니다.
하기는 자바 에러 내용입니다.
03-08 08:50:30.159 7548-7548/co.kr… E/AndroidRuntime: FATAL EXCEPTION: main
Process: co.kr…PID: 7548
java.lang.ExceptionInInitializerError
at com.kakao.auth.network.AuthNetworkService$Factory.getInstance(AuthNetworkService.java:79)
at com.kakao.kakaotalk.api.KakaoTalkApi.(KakaoTalkApi.java:42)
at com.kakao.kakaotalk.api.KakaoTalkApi.getInstance(KakaoTalkApi.java:54)
at com.kakao.kakaotalk.v2.KakaoTalkService.(KakaoTalkService.java:154)
at com.kakao.kakaotalk.v2.KakaoTalkService.getInstance(KakaoTalkService.java:164)
at co.kr…KakaoActivity.requestSendMemo(KakaoActivity.java:89)
at co.kr…KakaoActivity$2.onClick(KakaoActivity.java:154)
at android.view.View.performClick(View.java:5194)
at android.view.View$PerformClick.run(View.java:20903)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5942)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
Caused by: java.lang.IllegalStateException: Session is not initialized. Call KakaoSDK#init first.
at com.kakao.auth.Session.getCurrentSession(Session.java:110)
at com.kakao.auth.network.AuthNetworkService$Factory.(AuthNetworkService.java:72)
at com.kakao.auth.network.AuthNetworkService$Factory.getInstance(AuthNetworkService.java:79)
at com.kakao.kakaotalk.api.KakaoTalkApi.(KakaoTalkApi.java:42)
at com.kakao.kakaotalk.api.KakaoTalkApi.getInstance(KakaoTalkApi.java:54)
at com.kakao.kakaotalk.v2.KakaoTalkService.(KakaoTalkService.java:154)
at com.kakao.kakaotalk.v2.KakaoTalkService.getInstance(KakaoTalkService.java:164)
at co.kr…KakaoActivity.requestSendMemo(KakaoActivity.java:89)
at co.kr…KakaoActivity$2.onClick(KakaoActivity.java:154)
at android.view.View.performClick(View.java:5194)
at android.view.View$PerformClick.run(View.java:20903)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5942)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1399)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)
제일 윗줄에 코드를 보면 AuthNetworkService라는 클래스에서 아래 코드의 instnace 부분에서 문제가 있다가 나옵니다.
public static AuthNetworkService getInstance() {
return instance;
}
appKey는 등록했는데 혹시 제가 뭘 안해서 이런 에러가 나는지 조언좀 부탁드립니다. ㅠㅠ