DEV Community

Pere Sola
Pere Sola

Posted on

1

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)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay