问题
log如下:
10-22 15:18:32.130 29298 29298 I art : Rejecting re-init on previously-failed class java.lang.Class<com.qiscus.sdk.chat.core.QiscusCore$$Lambda$4>
10-22 15:18:32.130 29298 29298 I art : Rejecting re-init on previously-failed class java.lang.Class<com.qiscus.sdk.chat.core.QiscusCore$$Lambda$4>
10-22 15:18:32.130 29298 29298 I art : Rejecting re-init on previously-failed class java.lang.Class<com.qiscus.sdk.chat.core.QiscusCore$$Lambda$5>
10-22 15:18:32.130 29298 29298 I art : Rejecting re-init on previously-failed class java.lang.Class<com.qiscus.sdk.chat.core.QiscusCore$$Lambda$5>
10-22 15:18:32.140 29298 29298 I art : Rejecting re-init on previously-failed class java.lang.Class<com.qiscus.sdk.chat.core.QiscusCore$$Lambda$1>
10-22 15:18:32.140 1412 2480 D SettingsProvider: lookupValue table secure cache contains Key android_id , value = Bundle[{value=b50db7b9ef8e2c0d}]
......
......
10-22 15:18:36.180 29298 29298 E AndroidRuntime: FATAL EXCEPTION: main
10-22 15:18:36.180 29298 29298 E AndroidRuntime: Process: com.pure.indosat.care, PID: 29298
10-22 15:18:36.180 29298 29298 E AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/gson/Gson;
10-22 15:18:36.180 29298 29298 E AndroidRuntime: at com.qiscus.sdk.chat.core.QiscusCore$LocalDataManager.<init>(QiscusCore.java:573)
10-22 15:18:36.180 29298 29298 E AndroidRuntime: at com.qiscus.sdk.chat.core.QiscusCore.initWithCustomServer(QiscusCore.java:137)
10-22 15:18:36.180 29298 29298 E AndroidRuntime: at com.qiscus.sdk.Qiscus.initWithCustomServer(Qiscus.java:126)
10-22 15:18:36.180 29298 29298 E AndroidRuntime: at com.qiscus.sdk.Qiscus.init(Qiscus.java:87)
解决方法
关闭Android Studio中的Instant Run功能。File -> Setting -> Build,Execution,Deployment -> Instant Run,取消勾选。