2017-04-12 193 views
0

我在一个新项目上收到此警告。Visual Studio 2017智能感知错误

“Undefined complexType'java.lang.Object'用作复杂类型扩展的基础。”

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"> 
<android:orientation="vertical"> 
<android:layout_width="match_parent"> 
<android:layout_height="match_parent"/> 

有架构Android的布局xml.xsd,schemas.android.com.apk.res.android.xsd,schemas.android.com.apk.red.auto.xsd,schemas.android .com.tools.xsd

任何想法,为什么我只有项目显示,如果我删除LinearLayout?

如果我在布局中放置任何内容,它不会显示任何intellisense。

谢谢

回答

0

这xml看起来不对,试试下面。我还添加了一个按钮,以便您可以看到示例内容项目。

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent"> 
    <Button 
     android:id="@+id/MyButton" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     android:text="MyButton" /> 
</LinearLayout> 
+0

谢谢你的回答我尝试你的xml代码,但没有改变。 –