Check out example codes for "More than one file was found with OS independent path 'META-INF/metadata.jvm.kotlin_module'". It will help you in understanding the concepts better.

Code Example 1

android {      
      packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/notice.txt'
        exclude 'META-INF/ASL2.0'
        exclude("META-INF/*.kotlin_module") 
      }          
}

Learn ReactJs, React Native from akashmittal.com