Visual Studio 2017下Xamarin Android设计文件及axml文件无法打开求助
Hey there, sorry to hear you're stuck with opening axml design files in your specific setup (VS 2017 v15.5.7, Xamarin 4.8.0.760, Xamarin.Android SDK 8.1.5.0). Let's walk through some practical, tried-and-tested fixes that often resolve this issue:
Clean and Rebuild Your Solution
Right-click your solution in the Solution Explorer → Select Clean Solution. Once that finishes, right-click again → Rebuild Solution. Corrupted build cache is a common culprit for design tool failures, and this clears out those problematic temporary files.Verify Xamarin Android Designer is Enabled
Open Visual Studio → Go to Tools → Options → Xamarin → Android Settings. Make sure the checkbox for Enable Xamarin Android Designer is ticked. If it was disabled, check it and restart Visual Studio to apply the change.Repair Your Visual Studio Installation
Launch the Visual Studio Installer, find your VS 2017 instance, click Modify, then select the Repair option. This fixes any missing or corrupted components that might be preventing the design tool from initializing properly.Manually Delete obj and Bin Folders
Close Visual Studio first, then navigate to your Android project's root directory. Delete theobjandbinfolders entirely. These folders store temporary build artifacts that can often get corrupted over time. Reopen your project afterward and try accessing the axml design tool again.Run Visual Studio as Administrator
Right-click the Visual Studio 2017 icon → Select Run as administrator. Sometimes insufficient permissions block the design tool from accessing necessary system resources, and running with admin rights bypasses that issue.Check for AXML Syntax Errors
If none of the above works, open the axml file in the code editor first. Look for red underlines or obvious syntax mistakes (like unclosed tags, invalid attribute names). Malformed XML will crash the design tool immediately, so fixing these errors first might get it working again.
内容的提问来源于stack exchange,提问作者onlyme

