com.android.build.transform.api.TransformException
Try adding multiDexEnabled true
to your app build.gradle file.
defaultConfig {
multiDexEnabled true
}
EDIT:
Try Steve's answer first. In case it happens frequently or first step didn't help multiDexEnabled
might help. For those who love to dig deeper here is couple similar issues (with more answers):
:app:dexDebug ExecException finished with non-zero exit value 2
Error:Execution failed for task ':app:dexDebug'. com.android.ide.common.process.ProcessException
Getting com.android.build.api.transform.TransformException: Error while generating the main dex list. on adding places sdk
Program type already present: com.android.volley.ParseError
This error generally means you have two dependencies that are both providing the same class, causing a conflict.
You could run ./gradlew app:dependencies
to list down all dependencies of all the libraries that you have included in your project. With this you can figure out the libraries that have common dependencies.
com.android.build.api.transform.TransformException
so if anyone in the future will be having having this, the correct way for me was to check my library versions that utilize live data. As the error suggests, it had an association with live data. You don't have to implement live data to get this error but utilizing any library that has connection with live data can lead to this problem.
In my case it was Firebase ui library as i updated android support library to 27.1.0.
so i also updated firebase ui ,library to 3.2.2.
as per google, this was an Intended behavior so the only thing to fix that is to update firebase ui library to a version that supports library 27.1.0.
as suggested here
com.android.build.api.transform.TransformException:
Such an issue usually caused by internal dependency of some of your dependency. So you need to exclude conflicted dependency from your dependency. But in most cases you as developer don't know which library you need to exclude from.
So just try adding exclude group: "com.google.android.gms"
to all the libraries one by one and try compile. When project is compiled, you have found the needed library to exclude from.
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. com.android.build.api.transform.TransformException
In version 17.0.0 and above, you need to use AndroidX, so you have 2 options:
1) Downgrade com.google.android.gms:play-services-auth to older version
2) Add/Migrate AndroidX to your app (Recommended)
Check this link for migration
Related Topics
Nullpointerexception Accessing Views in Oncreate()
Custom Listview Adapter Getview Method Being Called Multiple Times, and in No Coherent Order
How to Make an Android Device Vibrate? With Different Frequency
Do Line Endings Differ Between Windows and Linux
Generating Unique Random Numbers in Java
Java.Lang.Classnotfoundexception: Didn't Find Class on Path: Dexpathlist
How to Check Internet Access on Android? Inetaddress Never Times Out
How to Parse Json Array (Not Json Object) in Android
Android/Java - Date Difference in Days
Javafx on Linux Is Showing a "Graphics Device Initialization Failed For: Es2, Sw"
What Issues Should Be Considered When Overriding Equals and Hashcode in Java
Calculating the Difference Between Two Java Date Instances
What Is the Point of the Diamond Operator (≪≫) in Java