JDK is missing when you create a Xamarin-based app in Visual Studio 2015

This article helps you work around a problem where Java Development Kit (JDK) is missing when you create a Xamarin Android or Xamarin.Forms app in Microsoft Visual Studio 2015.

Original product version:   Visual Studio 2015
Original KB number:   4483429

Symptoms

When you create a Xamarin Android or Xamarin.Forms app in Visual Studio 2015, you may receive an error message that resembles the following error:

Xamarin.Android for Visual Studio requires Java Development Kit. Please install it or set Java Development Kit path on Tools->Options->Xamarin->Android Settings menu.

For example, you see an error message dialog box that's similar to the following screenshot:

Screenshot of the error message dialog box.

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, follow these steps:

  1. Install the latest JDK 8 that's available from the Oracle Java SE Development Kit 8 Downloads webpage.
  2. Follow the instructions in the error message to manually point your Visual Studio instance to the location of your new JDK.

Note

For the best mobile development experience, we encourage you to update to the latest Visual Studio version to keep up with the latest changes in iOS and Android development.

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.