Reputation: 1
Am trying to make a mobile game with xamarin/monogame using an android emulator.
I have a virtual Pixel 5 (API 30) created in android device manager that launches fine but refuses to be deployed to, so I tried to delete it and create another.
Deletion returns error message saying that the AVD can't be deleted because I have an incompatible JDK, please install Microsoft OpenJDK... The website (https://learn.microsoft.com/en-us/xamarin/android/get-started/installation/openjdk) the error message points me to tells me that Microsoft's OJDK is automatically installed if you selected the android SDK packages when installing visual studio community, which I did. Reinstalled this package and the error persists.
I have tried:
Manually downloading ODJK 18, 17, 11, and 8, and extracting to C:\Program Files\Android\jdk, then pointing Xamarin to the file path. I even ran "java -version" in Android adb command prompt, and it tells me that I do indeed have the JDKs installed. This is what it returns:
openjdk version "17.0.2" 2022-01-18 LTS
OpenJDK Runtime Environment Microsoft-30338 (build 17.0.2+8-LTS)
OpenJDK 64-Bit Server VM Microsoft-30338 (build 17.0.2+8-LTS, mixed mode, sharing)
I have also tried reinstalling VSC 2019 and it didn't work.
Other info: Initially the file location for the "automatically installed from android SDK package's ODJK" was under something called Eclipse foundation in C:\Program Files\Eclipse Foundation. I moved the only file in this folder (jdk-8.0.302.8-hotspot) to C:\Program Files\Android\jdk and set that as Xamarin's JDK location, restarted vsc, and tried again, to no avail.
Upvotes: 0
Views: 246