My Android app is not building.
The funny thing is that it suggests me:
Adding a packaging block may help, please refer to
And if I add packaging then it fails again and suggests to add packagingOptions, so it's driving me nuts, don't know if it is expecting packaging or packagingOptions, but anyway none of them seem to work.
This was my initial packagingOptions section:
packagingOptions {
resources {
pickFirsts += ['META-INF/LICENSE.txt']
excludes += ['META-INF/NOTICE.md', 'META-INF/LICENSE.md', 'META-INF/INDEX.LIST', 'META-INF/DEPENDENCIES', 'META-INF/io.netty.versions.properties']
}
}
Not working, and next is my current build.gradle (the commented code are all the combinations I've tried):
android {
...
packaging {
resources {
resources.excludes.add("META-INF/NOTICE.md")
resources.excludes.add("META-INF/LICENSE.md")
resources.excludes.add("META-INF/INDEX.LIST")
resources.excludes.add("META-INF/DEPENDENCIES")
resources.excludes.add("META-INF/io.netty.versions.properties")
/*pickFirsts += ['META-INF/LICENSE.txt']
excludes += ['META-INF/NOTICE.md', 'META-INF/LICENSE.md', 'META-INF/INDEX.LIST', 'META-INF/DEPENDENCIES', 'META-INF/io.netty.versions.properties']*/
}
//resources.excludes.add("META-INF/*")
}
...
}
I've already migrated gradle to latest 8.5 version with the assistant (and, just in case, also updated all libraries).
Of course I've already checked all SO similar threads before posting, but none of them helped me.
It was working in the past, but after some update -not sure what- it stopped working.
Now with a packaging block correctly set it complains:
Adding a packaging block may help, please refer to
What? I already have a packaging block inside android {} block.
BTW: The help
does not help.
What to try next?