由于“不兼容JDK”,因此无法在Android设备管理器中删除AVD或创建新的AVD。

发布于 2025-01-30 02:10:14 字数 1131 浏览 1 评论 0原文

我正在尝试使用Android模拟器使用Xamarin/Monogame制作手机游戏。

我在Android设备管理器中创建了一个虚拟Pixel 5(API 30),该虚拟Pixel 5(API 30)启动正常但拒绝部署到,因此我尝试将其删除并创建另一个。

删除返回错误消息,说由于我有不兼容的JDK,因此无法删除AVD,请安装Microsoft OpenJDK ... 该网站( https://learn.microsoft.com /en-us/xamarin/android/get-started/installation/openjdk )错误消息指向我告诉我,如果您在安装Visual Studio社区时选择了Microsoft的OJDK,则会自动安装Microsoft的OJDK做过。重新安装了此软件包,并且错误仍然存​​在。

我尝试过:

手动下载ODJK 18、17、11和8,然后提取到C:\ Program Files \ Android \ JDK,然后将Xamarin指向文件路径。我什至在Android ADB命令提示符中运行了“ Java -version”,它告诉我,我确实已经安装了JDK。这就是它返回的内容:

OpenJDK版本“ 17.0.2” 2022-01-18 LTS

OpenJDK运行时环境Microsoft-30338(构建17.0.0.2+8-lts)

OpenJDK 64位64位服务器VM Microsoft-30338(构建17.0.0.2+ 8-lts,混合模式,共享)

我还尝试重新安装VSC 2019,但它不起作用。

其他信息:最初,“自动从Android SDK软件包的ODJK安装”的文件位置在C:\ Program Files \ Eclipse Foundation中所谓的Eclipse Foundation下。我将此文件夹(JDK-8.0.302.8-hotspot)中的唯一文件移至C:\ Program Files \ Android \ JDK,并将其设置为Xamarin的JDK位置,重新启动VSC,并再次尝试,并无用。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文