Android Volley Error: Fatal Exception: java.lang.NegativeArraySizeException

I got this crash in my release app on Crashlytics while using volley version 1.1.0
ANDROID ERROR CRASHLYTICS LOG:
DiskBasedCache (.java )
#343com.android.volley.toolbox.DiskBasedCache.get
Fatal Exception: java.lang.NegativeArraySizeException
-1207
    com.android.volley.toolbox.DiskBasedCache.get (Unknown Source)
    com.android.volley.toolbox.DiskBasedCache.get (Unknown Source)
    com.android.volley.CacheDispatcher.run (Unknown Source)
So, I searched for solution related to exception in DiskBasedCache class of volley and I come across below a very useful post. For more: Out of memory with Volley 1.1.0 #127

It suggest to Update the volley gradle version to latest 1.1.1.
SOLUTION CODE:
dependencies {
    ...
    //compile 'com.android.volley:volley:1.1.0'
    compile 'com.android.volley:volley:1.1.1'
}

No comments:

Post a Comment

Popular Posts