1.場景描述
在項目中新建了Module並引用,結果在編譯時出現了錯誤,錯誤信息如下:
Error:Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Lcom/codingending/popupcontainer/BuildConfig;
2.解決方案
經過排查,發現這是由於主項目和Module的包名相同引起的,只需修改Module的AndroidManifest文件中的package屬性,就可以解決編譯錯誤。