大网数据广告活动
Web服务器与PHP

Can't install JDK in Visual Studio 2017

· 52CE 我爱测

You can't install JDK package in Visual Studio 2017. To solve this problem, update to latest version of Visual Studio 2017.

This article helps you work around an error (failed to download) that occurs when you install Java Development Kit (JDK) in Microsoft Visual Studio 2017.

Original product version:   Visual Studio 2017
Original KB number:   4483430

Symptoms

When you install JDK in Visual Studio 2017, you receive one of the following error messages:

  • Message 1

    "Package 'JavaJDKV2,version=1.8.6,chip=x86' failed to download"

  • Message 2

    "Package 'JavaJDKV2,version=1.8.6,chip=x64' failed to download"

  • Message 3

    "ackage 'JavaJDKV1,version=1.8.18' failed to download"

  • Message 4

    "PackageId:JavaJDKV2;PackageAction:DownloadPackage"

Cause

This issue occurs because Oracle no longer allows distribution of JDK in Visual Studio (as of January 2019).

Workaround

To work around this issue, try the following methods:

  • We recommend updating to the latest version of Visual Studio 2017. The latest version of Visual Studio 2017 uses an OpenJDK distribution for mobile development and avoids setup issues that concern Oracle JDK.

  • If you can't update your Visual Studio, install the latest JDK 8 that's available from the Java SE Development Kit 8 Downloads. Then set the JDK path by following these steps:

    1. Select Tools.
    2. Select Options.
    3. Select Xamarin.
    4. Select Android Settings.

Third-party information disclaimer

The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, about the performance or reliability of these products.

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
See source applicability · Source date 04/20/2020
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。