Visual Studio for Mac Android M1 芯片的仿真器错误
Visual Studio for Mac Android Emulator Error with M1 Chip
Mac 开发新手。尝试将 Android 模拟器设置为 运行。我有最新的 MacBook Air 和 M1Chip。当我转到 运行 Android 的模拟器时,我收到此警告并且模拟器从未启动:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Tooling.targets(5,5): Warning: An exception occurred while validating the Java SDK installation in '/Library/Java/JavaVirtualMachines/temurin-1.jdk/Contents/Home' that was found while searching the paths from 'monodroid-config.xml'. Ensure that the Android section of the Visual Studio options has a valid Java SDK directory configured. To use a custom SDK path for a command line build, set the 'JavaSdkDirectory' MSBuild property to the custom path. Exception: Not a directory
Parameter name: homePath (NoteTaker.Android)
Java SDK 的路径不正确或 SDK 已损坏。
首先,您应该从 Oracle Website 下载最新版本的 Java SDK。
然后在 Visual Studio 中,您需要导航至 首选项 > 项目 > SDK 位置 > Android > 位置.
您需要将 Java SDK 路径更新为您下载的新 SDK。
例如/Library/Java/JavaVirtualMachines/SDK17/Contents/Home
Mac 开发新手。尝试将 Android 模拟器设置为 运行。我有最新的 MacBook Air 和 M1Chip。当我转到 运行 Android 的模拟器时,我收到此警告并且模拟器从未启动:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Tooling.targets(5,5): Warning: An exception occurred while validating the Java SDK installation in '/Library/Java/JavaVirtualMachines/temurin-1.jdk/Contents/Home' that was found while searching the paths from 'monodroid-config.xml'. Ensure that the Android section of the Visual Studio options has a valid Java SDK directory configured. To use a custom SDK path for a command line build, set the 'JavaSdkDirectory' MSBuild property to the custom path. Exception: Not a directory
Parameter name: homePath (NoteTaker.Android)
Java SDK 的路径不正确或 SDK 已损坏。
首先,您应该从 Oracle Website 下载最新版本的 Java SDK。
然后在 Visual Studio 中,您需要导航至 首选项 > 项目 > SDK 位置 > Android > 位置.
您需要将 Java SDK 路径更新为您下载的新 SDK。
例如/Library/Java/JavaVirtualMachines/SDK17/Contents/Home