模块引用报错
MessageGradle提示:
Error:Error converting bytecode to dex:
Cause: com.android.dex.DexException: Multiple dex files define Lcom/sf/leafnet/camera/BuildConfig;
Gradle Console 提示:
AGPBI: {"kind":"error","text":"Error converting bytecode to dex:\nCause: com.android.dex.DexException: Multiple dex files define Lcom/sf/leafnet/camera/BuildConfig;","sources":[{}],"original":"UNEXPECTED TOP-LEVEL EXCEPTION:\ncom.android.dex.DexException:
Multiple dex files define Lcom/sf/leafnet/camera/BuildConfig;\n","tool":"Dex"}
网上提供很多方法,原因就是两个模块都有引用一些库jar 或者library 版本不一致导致可以打开as的 External Libraries 里面看到两个同名文件不同版本