[Solved-4 Solutions] Duplicate files during packaging of APK
Error Description:
- We get this kind of error during application run.
Error:Execution failed for task ':app:packageDebug'. Duplicate files copied in APK META-INF/notice.txt
build.gradle
Solution 1:
- The string comparison is case sensitive. try with exclude 'META-INF/notice.txt'
Solution 2:
- You need to include only these options in build.gradle:
Solution 3:
- See the detailed gradle output using gradle assemble and note the files that are duplicate and exclude them using:
Solution 4:
- These exclude options might solve your problem.