Multiple dex files define /BuildConfig, can't find the cause:

后端 未结 5 1622
不知归路
不知归路 2020-11-30 08:19

I\'m using the new gradle build system and I\'m facing the following problem:

UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex file         


        
5条回答
  •  广开言路
    2020-11-30 09:00

    In my case the similar error happened because there were 2 modules with the same package name in AndroidManifest.xml files. Using different package names in the modules solved the problem.

    Also the same thing happens when a library jar is being included twice (or more times) in several modules, as a dependency. In this case error message says about duplicate configs named after that library's package name. I solved it with including the library as a dependency in one module, and the second module had in dependencies the first module.

提交回复
热议问题