Error:Execution failed for task ':app:dexDebug'. finished with non-zero exit value 2 with Facebook Fresco

人盡茶涼 提交于 2019-12-04 09:16:18

Sometimes app:dexDebug error is shown when a library is being included more than once in your project. When the error is not related with any dependencies in your app, then it is probably the 65k method limit problem. The Dalvik Executable specification limits the total number of methods, you can read more about it here.

Modify your app Gradle build file configuration to include the support library and enable multidex output, as shown in the following Gradle build file snippet:

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.0"

    defaultConfig {
        ...
        minSdkVersion 14
        targetSdkVersion 21
        ...

        // Enabling multidex support.
        multiDexEnabled true
    }
    ...
}

dependencies {
  compile 'com.android.support:multidex:1.0.0'
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!