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

Mahdi Javaheri

09/16/2020, 7:37 AM
After migrating to
Kotlin 1.4.0
in my Android project (AGP 4.0.1) when i want to build a release apk there are errors in console:
Copy code
Warning: class [META-INF/versions/9/module-info.class] unexpectedly contains class [module-info]
Note: duplicate definition of program class [module-info]
Note: there were 20 duplicate class definitions.
      (<http://proguard.sourceforge.net/manual/troubleshooting.html#duplicateclass>)
Warning: there were 21 classes in incorrectly named files.
         You should make sure all file names correspond to their class names.
         The directory hierarchies must correspond to the package hierarchies.
Anyone has idea to resolve this issue?
g

gildor

09/16/2020, 7:40 AM
Maybe something like this:
Copy code
android.packagingOptions {
        exclude("META-INF/versions/9/module-info.class")
 }
But it still looks strange that module-info is packed
m

Mahdi Javaheri

09/16/2020, 7:45 AM
@gildor Didn't solve the issue
i also tried with
Kotlin 1.4.10
nothing changed either
a

Alexey Belkov [JB]

09/16/2020, 8:12 AM
See https://youtrack.jetbrains.com/issue/KT-41377. Please update your Proguard version to 6.2.2+.
15 Views