I developed one Android app it's working fine in 4.0 and above but when it comes to version 2.3.4 it giving an exception about Responcecache. I followed according to github:- https://github.com/candrews/HttpResponseCache.I'm getting below an exception running in 2.3.4 and 2.3.6.
FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: com.jakewharton.DiskLruCache
at com.integralblue.httpresponsecache.compat.libcore.net.http.HttpResponseCache.<init>(HttpResponseCache.java:83)
at com.geeklabs.footmark.util.HttpResponseUtil.enableHttpResponseCache(HttpResponseUtil.java:41)
com.integralblue.httpresponsecache.HttpResponseCache.install(httpCacheDir, httpCacheSize);
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
How to resolve this issue please help me.
As the exception stacktrace specifies it is a
NoClassDefFoundError
It occurs when the source was successfully compiled but at runtime, the required class files were not found.
Since you developed it in 4.0, At that time the specific classes were available, and your app ran succesfully.
And now you are trying to run the compiled app in the lower versions i.e 2.3.4 and 2.3.6, So here those classes may not be available, so JVM is throwing that error
Only thing you have to do is add the required jar files to your app, and try running it.