Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 layout.xml 文件中:
android:rotation="270" 在这种情况下,特别是 SeekBar 会得到“270”红色波浪线,暗示应该“提供诸如 px 之类的单位”。显然,添加任何单元都会产生编译器错误。
是否有地方可以修改 IntelliSense 规则集以更改此语法检查?
这是 Visual Studio 及其新分析器中的一个问题。除了它出现在错误列表中的烦恼之外,它不应该影响应用程序的构建或运行。
如果你真的不想看到它给出错误,你可以去
工具-选项-文本编辑器- Android XML -高级并取消选中在分析中启用布局诊断
这种方法的缺点是 IntelliSense 根本不检查您的代码拼写。