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

后端 未结 6 1843
[愿得一人]
[愿得一人] 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:20

    Fixed the issue, but don't understand why. Why do I need to enable multiDex when I believe Firestore is using AndroidX?

    Anyway, the fix. Add multiDexEnabled true to your app/build.gradle

    defaultConfig {
        // TODO: Specify your own unique Application ID 
        (https://developer.android.com/studio/build/application-id.html).
        applicationId "com.example.poll"
        minSdkVersion 16
        targetSdkVersion 28
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        //This line here...
        multiDexEnabled true
    }
    

提交回复
热议问题