为什么在vs中尝试安装java扩展包时会出现这些错误
[2020-12-19 18:36:45.800] [renderer1] [error] ["validating: Corrupt ZIP: end of central directory record signature not found"," at U.downloadInstallableExtension (file:///C:/Users/hp/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:635:461)"," at async U.doInstallFromGallery (file:///C:/Users/hp/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:632:594)"]
[2020-12-19 18:36:45.880] [renderer1] [error] Corrupt ZIP: end of central directory record signature not found: validating: Corrupt ZIP: end of central directory record signature not found
at U.downloadInstallableExtension (file:///C:/Users/hp/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:635:461)
at async U.doInstallFromGallery (file:///C:/Users/hp/AppData/Local/Programs/Microsoft VS Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:632:594)
我使用文件.vsix手动安装它并获得以下日志:
19/12/2020 18:38:15 - Microsoft VSIX Installer
19/12/2020 18:38:15 - -------------------------------------------
19/12/2020 18:38:15 - vsixinstaller.exe version:
19/12/2020 18:38:15 - 16.8.3036
19/12/2020 18:38:15 - -------------------------------------------
19/12/2020 18:38:15 - Command line parameters:
19/12/2020 18:38:15 - C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service\VSIXInstaller.exe,C:\vscjava.vscode-java-pack-0.12.1.vsix
19/12/2020 18:38:15 - -------------------------------------------
19/12/2020 18:38:15 - Microsoft VSIX Installer
19/12/2020 18:38:15 - -------------------------------------------
19/12/2020 18:38:16 - Skipping product Microsoft.VisualStudio.Product.BuildTools (9d27c81e) since it does not support extensions
19/12/2020 18:38:16 - Initializing Install...
19/12/2020 18:38:17 - Détails de l'extension...
19/12/2020 18:38:17 - Identifier : vscode-java-pack
19/12/2020 18:38:17 - Name : Java Extension Pack
19/12/2020 18:38:17 - Author : vscjava
19/12/2020 18:38:17 - Version : 0.12.1
19/12/2020 18:38:17 - Description : Popular extensions for Java development and more.
19/12/2020 18:38:17 - Locale : en-US
19/12/2020 18:38:17 - MoreInfoURL :
19/12/2020 18:38:17 - InstalledByMSI : False
19/12/2020 18:38:17 - SupportedFrameworkVersionRange : [0.0,2147483647.2147483647]
19/12/2020 18:38:17 -
19/12/2020 18:38:17 - SignatureState : Unsigned
19/12/2020 18:38:17 - Produits pris en charge :
19/12/2020 18:38:17 - Microsoft.VisualStudio.Code
19/12/2020 18:38:17 - Version :
19/12/2020 18:38:17 -
19/12/2020 18:38:17 - Références :
19/12/2020 18:38:17 - Détails de la signature...
19/12/2020 18:38:17 - Extension is not signed.
19/12/2020 18:38:17 -
19/12/2020 18:38:17 - Recherche des produits applicables...
19/12/2020 18:38:17 - Produit installé trouvé - Emplacement global
19/12/2020 18:38:17 - VSIXInstaller.NoApplicableSKUsException: Une ou plusieurs extensions sont destinées à Visual Studio Code. Essayez de les installer dans Visual Studio Code.
à VSIXInstaller.ExtensionService.GetInstallableDataImpl(IInstallableExtension extension, String extensionPackParentName, Boolean isRepairSupported, IStateData stateData, IEnumerable`1& skuData)
à VSIXInstaller.ExtensionService.GetInstallableData(String vsixPath, String extensionPackParentName, Boolean isRepairSupported, IStateData stateData, IEnumerable`1& skuData)
à VSIXInstaller.ExtensionPackService.IsExtensionPack(IStateData stateData, Boolean isRepairSupported)
à VSIXInstaller.ExtensionPackService.ExpandExtensionPackToInstall(IStateData stateData, Boolean isRepairSupported)
à VSIXInstaller.App.Initialize(Boolean isRepairSupported)
à VSIXInstaller.App.Initialize()
à System.Threading.Tasks.Task`1.InnerInvoke()
à System.Threading.Tasks.Task.Execute()
--- Fin de la trace de la pile à partir de l'emplacement précédent au niveau duquel l'exception a été levée ---
à Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
我尝试过安装一些其他的java扩展,比如maven for java,但在安装时也遇到了错误。
有什么建议吗?
5条答案
按热度按时间hk8txs481#
在java on visual studio code update–2020年11月中,强烈建议在vs代码上安装extension pack或Codeing pack for java for java development。请按照上面的链接安装java windows编码包。
trnvg8h32#
你的操作系统是什么??
此文件仅适用于windows
4jb9z9bj3#
这是我在使用你的链接安装时遇到的错误
7d7tgy0s4#
目前java扩展包可用于visualstudio代码,而不是visualstudio。
要在visual studio代码上启用java支持,可以手动执行以下操作:
安装jdk(非jre)11+。因为对java的语言支持需要JDK11+来启动自己。
[可选]在vs代码的设置中,指向
java.home
到jdk的主目录(如果它是由JAVA_HOME
,包含在PATH
,或安装在默认位置。)或者正如@user14479250所提到的,您可以简单地运行一体化安装程序,如果缺少vs代码、JDK11和java扩展,它将安装vs代码。
Windows:https://aka.ms/vscode-java-installer-win
Mac:https://aka.ms/vscode-java-installer-mac
vojdkbi05#
您可以通过以下链接在visual studio代码上安装java:https://aka.ms/vscode-java-installer-win
如果您再次遇到任何错误,请在下面发表评论以帮助您