How to fix "dalvik.system.BaseDexClassLoader.findClass" exception in Flutter?

petrussola

Pere Sola

Posted on January 7, 2023

How to fix "dalvik.system.BaseDexClassLoader.findClass" exception in Flutter?

Were you excited to release this app just to notice that the app was crashing when trying to load it in production? You are not alone.

In my case, I examined the crash details in the Play Store console. I saw in the stack trace that it was caused by:

Caused by java.lang.ClassNotFoundException:
  at dalvik.system.BaseDexClassLoader.findClass (BaseDexClassLoader.java:218)
Enter fullscreen mode Exit fullscreen mode

Make sure that the package value in /app/src/main/AndroidManifest.xml is the same as android\app\src\main\kotlin\com\example\kombucha_app\MainActivity.kt.

In my case, it wasn't. Once they were the same and I published a new release of the app, it worked.

๐Ÿ’– ๐Ÿ’ช ๐Ÿ™… ๐Ÿšฉ
petrussola
Pere Sola

Posted on January 7, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

ยฉ TheLazy.dev

About