生成XML文件时出现Android错误

时间:2012-02-11 20:22:03

标签: android

我正在尝试按如下方式创建XML文件。但我得到以下错误

Unparsed aapt error(s) check the Console for output

在cosole中,我得到以下错误

[2012-02-11 20:39:08 - TEST] res\layout\final.xml:0: error: invalid symbol: 'final'

我的XML文件如下

<?xml version="1.0" encoding="utf-8"?>

<TableLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:background="#000044">

<TableRow>

<TextView
android:text="Col 1"
android:width ="80px"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
/>

<TextView
android:text="Col 2"
android:width ="80px"
/>

<TextView
android:text="Col 3"
android:width ="80px"
/>

<TextView
android:text="Col 4"
android:width ="80px"
/>

<TextView
android:text="Col 5"
android:width ="120px"
/>

</TableRow>

<TableRow>
<TextView />

</TableRow>


</TableLayout>

请帮忙

由于

KR

1 个答案:

答案 0 :(得分:3)

final是java的保留关键字。因此,改为最终,将其更改为 layout_final

了解更多信息,请阅读this

相关问题