> Task :app:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED
D8: Cannot fit requested classes in a single dex file (# methods: 70644 > 65536

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives: 
  The number of method references in a .dex file cannot exceed 64K.
  Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html

解决方法:在android/app/build.gradle文件中添加> Task :app:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED

multiDexEnabled true(写在defaultConfig对象中)

 

相关文章:

  • 2021-07-20
  • 2022-01-20
  • 2022-12-23
  • 2022-01-13
  • 2021-10-04
  • 2021-12-31
猜你喜欢
  • 2021-12-16
  • 2021-10-05
  • 2021-12-22
  • 2021-11-05
  • 2021-12-12
相关资源
相似解决方案