DEV Community

Pere Sola
Pere Sola

Posted on

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.

Top comments (0)