https://kotlinlang.org logo
#android
Title
# android
c

Christopher Elías

07/25/2020, 6:06 AM
Hello my friends. I've been struggling with this for 2 days now. I'm trying to run my InstrumentedTest, but the build window throw this output "More than one file was found with OS independent path 'META-INF/AL2.0"? I already add this:
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/main.kotlin_module'
    
}
but it have no effects. Im using also Kotlin Gradle DSL. and my AS version is Android Studio 4.0.1 Build #AI-193.6911.18.40.6626763, built on June 24, 2020 Runtime version: 1.8.0_242-release-1644-b01 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Windows 10 10.0 GC: ParNew, ConcurrentMarkSweep Memory: 1237M Cores: 8 Registry: ide.new.welcome.screen.force=true, ide.balloon.shadow.size=0 Non-Bundled Plugins: org.jetbrains.kotlin, com.google.services.firebase, com.thoughtworks.gauge
m

Mark Murphy

07/25/2020, 12:39 PM
FWIW, your error does not match your
packagingOptions
. The error refers to
META-INF/AL2.0
, while your line in
packagingOptions
refers to
META-INF/ASL2.0
.
👍 2
c

Christopher Elías

07/25/2020, 5:06 PM
Thank you Mark. That was the solution.
👍 1
2 Views