gson을 이용해서 pendingintent 를 sharedPreferences 에 저장하는 작업을 하고 있는데요.
빨간색글씨 위치 : 120 : pendingIntent = gson.fromJson(json,PendingIntent.class); 이 구문에서 자꾸 에러가 납니다.
TypeToken 을 지정해줘야될것같은데요. 여러가지 해봤는데 전부 안되네요.. 몇시간째 이러고있는지 모르겠습니다. 제발 알려주세요 ㅠㅠ
Error : Unable to start service org.jsb.busgod.busgod.LocationService@412cfe38 with Intent { cmp=org.jsb.busgod.busgod/.LocationService (has extras) }: java.lang.RuntimeException: Unable to invoke no-args constructor for interface android.content.IIntentSender. Register an InstanceCreator with Gson for this type may fix this problem.
Caused by: java.lang.RuntimeException: Unable to invoke no-args constructor for interface android.content.IIntentSender. Register an InstanceCreator with Gson for this type may fix this problem.
Caused by: java.lang.reflect.InvocationTargetException
Caused by: java.lang.InstantiationException: can't instantiate class android.content.IIntentSender; abstract class or interface
at org.jsb.busgod.busgod.LocationService.deleteLocation(LocationService.java:120)
at org.jsb.busgod.busgod.LocationService.onStartCommand(LocationService.java:82)