Trying to use Firestore in my project. My project is a brand new one, but having problems running the app on my device without getting an error: Execution failed for tas
I just met with this error, and it turns out it can be fixed easily. Of course, other answers on this are really great and it tells you how to fix it. However, I was wondering why this even happened. It turns out this comes from the minSdkVersion
used. If this is set to 20
or lower, you need to configure your app for multiDex support.
defaultConfig {
applicationId "com.inspire.aaym"
minSdkVersion 21
targetSdkVersion 30
}
So, if you app is not intended to be used in Android version prior to 5.0, setting the minSdkVersion
number to 21
will easily fix this issue. If not, follow the workaround to enable mutiDex support.
Read more from the official document: https://developer.android.com/studio/build/multidex#mdex-gradle