I tried using OkHttp and Picasso (following this answer) for disk caching of images that I was downloading from Firebase storage. Now, the app gives exceptions and crashes.
I found another "answer" to the issue. I was getting the same error message using Android Studio 3.3.2. I decided to clear ALL breakpoints. On the breakpoints dialog there are two "permanant" options, Java Exception Breakpoints and Exception Breakpoints. I had them both checked, by accident probably. When I cleared them and other break points I could run under Debug mode. Now that debug is running I can add break points as long as those are not checked!
My Code way compiling well on the device using USB cable, but when I was trying to install it using *.apk file it was breaking, so I unchecked the option File -> Settings -> Build, Execution, Deployment -> Instant Run, but now its working fine with *.apk file and starting breaking with USB install, the error message is in the attachec image, even if I press OK it doesn't work, when I try yo install it again the same error message appears.
(I know this is an old question, but I came here looking for a solution to a similar problem.)
I have a different answer to consider before you exhaust all the other suggestions above: the ClassNotFoundException: YourParcelableClass error may not be the problem. In fact, it may not be a problem.
I have an app which displays a screen of various content which is passed in as a Parcelable and rendered as HTML in a WebView; it was working great until I cleaned up the code, checked it in, checked out a clean new tree, and uninstalled & reinstalled the app on my phone. I started getting a blank screen; obviously that ClassNotFoundException in the log meant my content was not being unmarshalled correctly.
After at least an hour of disabling Instant Run, rm -rf .gradle
, Clean Project, Invalidate Caches & Restart, etc., etc., I started adding increasingly sanity-questioning logging until I figured out that I was getting my content from Intent.getParcelableExtra()
; the blank screen appeared to be unrelated! (I still don't know why, but WebView.loadData()
had stopped working, and had to be replaced with WebView.loadDataWithBaseURL()
.)
Hopefully this saves someone else an hour of stupidity. If you see that ClassNotFoundException with your class' name, check to see whether your objects are still being unmarshalled correctly; they might be!
Just remove your project's build folder, then clean and run your application. This did the trick for me...
1)Kindly uninstall the app from your mobile
2)Reinstall the app now from android studio
3)98% it will work else clean the project and reinstall it again
You may need to enable multidex, follow the guide from this
https://developer.android.com/studio/build/multidex.html ,for enabling multidex
defaultConfig {
minSdkVersion 14
targetSdkVersion 21
multiDexEnabled true
}
dependencies {
compile 'com.android.support:multidex:1.0.0'
}