Execution failed for task ':app:mergeDexDebug'. Firestore | Flutter

后端 未结 6 1852
[愿得一人]
[愿得一人] 2021-01-31 08:32

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

6条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-31 09:09

    The problem is with multidex builder. Actually, this often happens when you have imported a lot of packages in your yaml file which cannot fit into a single .dex built hence you have to enable multidex.

    Go to android/app/build.gradle and add the following lines of codes:

    dependencies {
      implementation 'com.android.support:multidex:1.0.3' //enter the latest version
    }
    android {
        defaultConfig {
            multiDexEnabled true
        }
    }
    

提交回复
热议问题