This is my .gradle file:
apply plugin: \'com.android.application\'
android {
compileSdkVersion 21
buildToolsVersion \"21.1.2\"
defaultConfig {
Uncomfortably this issue may have several reasons. In my case, it was because of the max line number is exceeded. It is so annoying that the message Android Studio shows does not mean anything, but somehow i found the solution as below:
https://developer.android.com/tools/building/multidex.html
You have to create a class that extends MultiDexApplication, and override the following method:
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
Do not forget to add "name" inside tag in your AndroidManifest file as described in the above link.