Android

com.android.build.api.transform.TransformException: Error while generating the main dex list.

Error:FAILURE: Build failed with an exception.

* What went wrong:

Execution failed for task ‘:wellness:transformClassesWithMultidexlistForDebug’.

> com.android.build.api.transform.TransformException: Error while generating the main dex list.

* Try:

Run with –stacktrace option to get the stack trace. Run with –info or –debug option to get more log output. Run with –scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 31s

해결법

AndroidManiFest.xml 내에 


<application
android:name=".MyApplication"

android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme">

public class MyApplication extends MultiDexApplication {

@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}

}

Leave a Reply

error: Content is protected !!