Prior to Android 5.0 I was able to load DEX files dynamically using DexClassLoader and calling loadClass() method but with the latest Android version I get a
It is the problem with making dex file. Change the command as below then will work in all versions of android.
dx.bat --dex --output path/output.jar path/input.jar
The above method in windows will generate a .jar file with classes.dex file inside that jar file. The DexClassLoader is searching for classes.dex file inside, that is why it is throwing ClassNotFoundException