:app:transformClassesWithMultidexlistForDebug FAILED

僤鯓⒐⒋嵵緔 提交于 2019-12-01 11:08:57

Answer

I had to do the following at the app level

  • Remove rt.jar as library
  • Remove compile files('libs/rt.jar') from build.gradle
  • Clean and build project.

Thanks to George Mulligan for pointing it out.

I know it is passed. but I had same problem. the message was this:

Error:Execution failed for task ':app:transformClassesWithMultidexlistForDebug'. java.io.IOException: Can't write [D:...app\build\intermediates\multi-dex\debug\componentClasses.jar] (Can't read [C:....\support-core-ui-27.1.1.aar\eadf2be3981e05166424b72b4128200e\jars\classes.jar(;;;;;;**.class)] (Duplicate zip entry [classes.jar:android/support/v4/view/ViewPager$1.class]))

I searched a lot but nothing found. I resolved it by adding below line to gradle:

implementation 'com.android.support:support-v4:27.0.2'
Bamanyi

I'm not sure this is the same for the Windows OS with straight JAVA. I was having the same issue with cordova run android and it always fail in Mac. So I added the following to my build.gradle file and the build passed, and I was able to test on the emulator. Add your compiled info under android section and multidex under default config

android {
    compileSdkVersion 23
    buildToolsVersion "23"
}

defaultConfig {
    multiDexEnabled true
}

Notice the build is just 23 and not 23.0.1

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