nestserau
01/31/2019, 10:38 AMMore than one file was found with OS independent path
when trying to build it. Googled it up a little bit, and came up with this workaround (to be placed in the build.gradle
of the library consumer):
android {
packagingOptions {
pickFirst 'META-INF/ktor-http.kotlin_module'
pickFirst 'META-INF/kotlinx-io.kotlin_module'
pickFirst 'META-INF/atomicfu.kotlin_module'
pickFirst 'META-INF/ktor-utils.kotlin_module'
pickFirst 'META-INF/kotlinx-coroutines-io.kotlin_module'
pickFirst 'META-INF/ktor-client-core.kotlin_module'
}
}
Now the compiler is happy. But is there no other solution? Not a deal breaker for me, but would like to address the core of the issue instead of having this floppy workaround.packagingOptions {
pickFirst 'META-INF/*.kotlin_module'
}
I think I’ll live with it for the time being.ribesg
01/31/2019, 11:04 AMnestserau
01/31/2019, 11:36 AMMETA-INF
files are not needed at all for the APK. So I guess any way you can shut the compiler up is the best one.yshrsmz
01/31/2019, 1:15 PMexclude
instead of pickFirst
ribesg
01/31/2019, 1:16 PMnestserau
01/31/2019, 1:25 PMh0tk3y
02/01/2019, 3:00 PM*.kotlin_module
files may interfere with accessing reflection of top-level declarations. So you may want to include them into the APK but maybe provide different names for them. However, the conflicting names are most likely an issue on the library side. Ideally, the module name conflicts should be resolved in the libraries side.nestserau
02/04/2019, 10:43 AM