Execution failed for task ':app:dexDebug'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException

前端 未结 7 1325
小蘑菇
小蘑菇 2020-11-29 13:14

I am building my android project when i got this error after import docx4j library in my project. What should i do to get rid of this exception.

Error

7条回答
  •  半阙折子戏
    2020-11-29 13:42

    The Android plugin for Gradle available in Android SDK Build Tools 21.1 and higher supports multidex, so you have to add multiDexEnabled true to your gradle file like below :

    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'
    }
    

提交回复
热议问题