I\'ve tried both the example in Oracle\'s Java Tutorials. They both compile fine, but at run-time, both come up with this error:
Exception in thread \"main\"
I have faced with the problem today. I have an Android project and after enabling multidex
the project wouldn't start anymore.
The reason was that I had forgotten to call the specific multidex method that should be added to the Application class
and invoked before everything else.
MultiDex.install(this);
Follow this tutorial to enable multidex correctly. https://developer.android.com/studio/build/multidex.html
You should add these lines to your Application class
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}