Just got this error during the build, of an Androi...
# ktor
d
Just got this error during the build, of an Android multi-module project:
More than one file was found with OS independent path 'META-INF/ktor-http.kotlin_module'
j
Add this under the android scope in your gradle config:
Copy code
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/ktor-http.kotlin_module'
        exclude 'META-INF/kotlinx-io.kotlin_module'
        exclude 'META-INF/atomicfu.kotlin_module'
        exclude 'META-INF/ktor-utils.kotlin_module'
        exclude 'META-INF/kotlinx-coroutines-io.kotlin_module'
        exclude 'META-INF/ktor-client-json.kotlin_module'
        exclude 'META-INF/ktor-client-logging.kotlin_module'
        exclude 'META-INF/ktor-client-core.kotlin_module'
    }
}
­čĹŹ 1
d
It worked, but is it a must have or a workaround?
j
For now it is both as far as I have found information
d
ok, thanks