简体   繁体   中英

NullPointerException in Quickblox

I'm getting a NullPointerException . When getting the dialogs from quickblox in the log cat I can see that the dialogs are retrieved from quickblox, but when setting the adapter I get this:

java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference
10-26 01:04:16.331 21745-21745/? E/AndroidRuntime:     at com.quickblox.chat.model.QBDialog.getType(Unknown Source)

And this is only present in the release build. In the debug version everything works perfectly. Is there any rule I should add to the progaurd to eliminate this error?

here are my progaurd rules for quickblox:

#QuickBlox
-keep class org.jivesoftware.smack.initializer.VmArgInitializer {  public *; }
-keep class org.jivesoftware.smack.ReconnectionManager { public *; }
-keep class com.quickblox.module.c.a.c { public *; }
-keep class com.quickblox.module.chat.QBChatService { public *; }
-keep class com.quickblox.module.chat.QBChatService.loginWithUser { public *; }
-keep class com.quickblox.module.chat.listeners.SessionCallback { public *; }
-keep class * extends org.jivesoftware.smack { public *; }
-keep class org.jivesoftware.smack.** { public *; }
-keep class org.jivesoftware.smackx.** { public *; }
-keep class com.quickblox.** { public *; }
-keep class com.quickblox.module** { public *; }
-keep class * extends org.jivesoftware.smack { public *; }
-keep class * implements org.jivesoftware.smack.debugger.SmackDebugger { public *; }
-keep class org.jivesoftware.** { public *; }
-keep class com.quickblox.* { public *; }
-keep class * extends org.jivesoftware.smack { public *; }
-keep class com.quickblox.chat.QBChatService.login* { public *; }
-keep class * extends com.quickblox.core.server.BaseService { public *; }

Try adding:

-keep class com.quickblox.chat.**
-keep class com.quickblox.chat.** { *; }
-keepnames class com.quickblox.chat.**
-keepnames class com.quickblox.chat.** { *; }
-keepclassmembers class com.quickblox.chat.** {*;}
-keepclassmembers enum com.quickblox.chat.** {*;}
-keepclassmembers interface com.quickblox.chat.** {*;}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM