简体   繁体   English

没有主要清单属性,IntelliJ

[英]No Main Manifest Attribute, IntelliJ

I Have been having this issue for a while and today finally solved it. 我已经有一段时间了,今天终于解决了。

When creating a Jar artifact in IntelliJ and trying to run it, I always got the error 在IntelliJ中创建Jar工件并尝试运行它时,总是出现错误

no main manifest attribute, in xxxx.jar xxxx.jar中没有主清单属性

The problem ONLY occured when I added library files to the artifact, and without external libraries the jar executed fine. 仅当我将库文件添加到工件时才发生此问题,并且在没有外部库的情况下,jar可以很好地执行。

The process I followed to create the artifact was as follows : File -> Project Structure -> Artifacts -> add Jar -> from modules with dependencies... -> After The Next Windows the following was shown 我遵循的创建工件的过程如下:文件->项目结构->工件->添加Jar->来自具有依赖项的模块...->在下一个Windows之后,显示以下内容 在此处输入图片说明

And my problem was fixed when I removed all the items that had 'Extracted" prefixes. I also added The Library File to look like this -> Which made my jar with library dependencies work again 而且,当我删除所有带有“ Extracted”前缀的项目时,我的问题已得到解决。我还添加了“库文件”,使其看起来像这样->这使具有库依赖项的jar再次工作 ![在此处输入图片描述 ] 2 ] 2

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 gdx-setup.jar中没有主清单属性 - No main manifest attribute, in gdx-setup.jar 如何修复JAR文件中指定“无主清单属性”的错误? - How can I fix an error specifying “no main manifest attribute” in a JAR file? Android Studio:错误:C:…\\ libs \\ opencsv-4.1.jar中没有主清单属性 - Android Studio : Error: no main manifest attribute, in C:…\libs\opencsv-4.1.jar 错误:验证失败,在 AndroidManifest.xml 中退出主清单和属性 uses-feature#20000@glEsVersion - Error:Validation failed, exiting main manifest and Attribute uses-feature#20000@glEsVersion at AndroidManifest.xml 没有清单属性Android Studio - No manifest attribute Android Studio 合并错误:属性元数据需要占位符替换,但未提供值。 BazelFaceMesh.app 主清单(此文件) - Merging Errors: Attribute meta-data requires a placeholder substitution but no value is provided. BazelFaceMesh.app main manifest (this file) 清单合并失败:属性提供程序 - Manifest merger failed : Attribute provider 清单:缺少必需的属性:autoRevokePermissions - Manifest: missing required attribute: autoRevokePermissions Android 此处不允许使用清单属性 - Android manifest attribute not allowed here 清单中不允许使用属性android名称吗? - Attribute android name does not allowed in manifest?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM