Multiple dex files define Lcom/RNFetchBlob/RNFetchBlobConst;
Opened this issue · 2 comments
Hello im trying to build my android project and im getting this error when i build APK for android
Error:Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Lcom/RNFetchBlob/RNFetchBlobConst;
Error:com.android.dex.DexException: Multiple dex files define Lcom/RNFetchBlob/RNFetchBlobConst;
Error:Execution failed for task ':app:transformDexArchiveWithDexMergerForDebug'.
com.android.build.api.transform.TransformException: com.android.dex.DexException: Multiple dex files define Lcom/RNFetchBlob/RNFetchBlobConst;
it works on iOS but it won't work on android
+1
In my case, I solve with the following steps.
Open MainApplication.java
I found there are duplicate new RNFetchBlobPackage(), I delete one of the new RNFetchBlobPackage() here.
Then also check for the app bundle dependencies, avoid duplicate compile project(':react-native-fetch-blob')