Gradle DSL method not found : 'multiDexEnabled()'

后端 未结 6 1929
无人及你
无人及你 2021-01-17 23:55

I followed the multidex guide at https://developer.android.com/tools/building/multidex.html

But I get this error Gradle DSL method not found : \'multiDexEnab

6条回答
  •  自闭症患者
    2021-01-18 00:37

    In app/build.gridle under defaultConfig add:

    defaultConfig {
       
        ...
        multiDexEnabled true
        ...
    }
    

    Then, at the bottom, add this code exactly like this if you dont have dependencies block already:

    dependencies {
        ...
        implementation "com.android.support:multidex:1.0.3"
        ...
    }
    

    Finally, in pubspec.yaml under dependencies add:

    firebase_core: ^0.5.0+1
    

    After these changes your app should work properly.

提交回复
热议问题