gradlew  assembleDebug  --stacktrace

查看使用的依赖的

Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
> com.android.build.api.transform.TransformException: Error while generating the main dex list
这个问题多半是依赖重复导致的
在android studio Terminal 输入 gradlew  assembleDebug  --stacktrace
来查到具体问题
例如:
Caused by: com.android.tools.r8.errors.CompilationError: Program type already present: it.s
ephiroth.android.library.imagezoom.ImageViewTouch$OnImageViewTouchDoubleTapListener
 
it.sephiroth.android.library.imagezoom。这个包重复。
解决办法:
1、自己添加了两个:
删掉一个就可以。
2、如果是在第三包里有引用,自己又引入(在哪个第三方的这个不好找,凭自觉了)
删掉自己引入的或把第三方里面的去除
api  ('com.xxx.xxxx.xxx'){
    exclude group: 'it.sephiroth.android.library.imagezoom'
}

相关文章:

  • 2021-11-05
  • 2021-12-18
  • 2022-12-23
  • 2022-12-23
  • 2021-12-10
  • 2021-05-20
  • 2021-12-02
猜你喜欢
  • 2022-01-12
  • 2021-04-26
  • 2021-11-07
  • 2021-04-04
  • 2021-09-01
  • 2021-12-08
  • 2022-12-23
相关资源
相似解决方案