Search code examples
androidandroid-proguardandroid-multidex

MultiDexApplication Class Not Found


I'm using MultiDex with Proguard, and it works fine for every phone with API >= 21, probably even 20 (Can't download it on emulator), but my min SDK is set to 19, and on 19 it throws this error

Unable to instantiate application android.support.multidex.MultiDexApplication: java.lang.ClassNotFoundException: Didn't find class "android.support.multidex.MultiDexApplication"

Why is that, and can I fix it?


Solution

  • Ok, guys, i found the solution here. I tried many different things recommended everywhere, tried to extend Application class, install multiDex in onCreate , attachBaseContext, tried adding multiDex keep files, tried it on different devices and all that stuff, and the solution was just simple clean build.

    I just went in Android Studio to Build -> Clean Project and now it runs on Android 19