In the build.gradle application module
android { ... defaultConfig { multiDexEnabled true ... } } dependencies { // add dependency compile 'com.android.support:multidex:1.0.1' }
Change the name in AndroidManifest.xml
<application .... android:name=".MyApplication"> // ... </application>
Contains file MyApplication.java
public class MyApplication extends Application { @Override protected void attachBaseContext(Context base) { super.attachBaseContext(base); MultiDex.install(this); } }
See the link for more details.
Garg's
source share