Android学习ING,遇到一个错误.
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="10dip"
android:background="#0000FF">
<TextView
android:text="请输入用户名:"
android:id="@+id/label"
android:layout_width="fill_content"
android:layout_height="wrap_content" />
</RelativeLayout>
报错:
error: Error: String types not allowed (at 'layout_width' with value 'fill_content').
为什么?按照书上的代码打的!实在不知道错在哪儿了!囧!
本文记录了一个关于Android开发中遇到的布局宽度设置错误,并详细展示了出现错误的XML代码片段。作者按照书籍指导输入代码,但在运行时遇到了字符串类型不允许作为layout_width属性值的问题。
3723

被折叠的 条评论
为什么被折叠?



