所以这是我的代码之一,每当我单击运行时,由于此代码中的错误,我的项目都无法构建
android:id="@+id/list_item_forecast_textview" />
对于此代码,它表示文件意外结束,在代码中的
>
旁,代码中的>
旁有一条红色的小字形线。我应该如何解决小代码错误?
最佳答案
@Simran:
我认为您缺少像<
这样的开头标签。请添加此。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView android:id="@+id/list_item_forecast_textview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello,I am a TextView" />
</LinearLayout>
我认为您是Android的新手,因此在开始之前,请阅读xml Write the XML的正式文档
关于android - Android中的代码错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32236956/