IntelliJ does not apply Main class property


Intellij always adds wrong main class "org.apache.commons.compress.archivers.Lister" in MANIFEST.MF inside jar file, even I DID applied correct main class "" in Artifacts. BlackObfuscator\dex-tools\src\main\resources\META-INF\MANIFEST.MF contains

Manifest-Version: 1.0

I tried invalidating cache, rebuilding project, resync gradle etc, but nothing helps. 

What I'm missing? Please check my project Upload id: 2022_09_15_Qc5YvhT9Q3F8DNrRsPoKfU (file:

Comment actions Permalink

None of the solutions helps, but I noticed a person posted a screenshot containing META-INF folder inside artifacts which gave me a hint. IntelliJ does not create META-INF in the root folder, thus causing strange issue. After messing around, it finally create META-INF in the root folder. I think I must select one of module instead All modules in "creating JAR from Module" dialog in order to create META-INF. Strange

Now it adds correct META-INF with correct Main class when building JAR


Please sign in to leave a comment.