android:layout_width="match_parent" 里为什么总是提示match_parent的类型不匹配

/* AUTO-GENERATED FILE.  DO NOT MODIFY.
 *
 * This class was automatically generated by the
 * aapt tool from the resource data it found.  It
 * should not be modified by hand.
 */

package com.friendlyarm.LEDDemo;

public final class R {
    public static final class attr {
    }
    public static final class drawable {
        public static final int icon=0x7f020000;
    }
    public static final class id {
        public static final int btnLED1Off=0x7f050001;
        public static final int btnLED1On=0x7f050000;
        public static final int btnLED2Off=0x7f050003;
        public static final int btnLED2On=0x7f050002;
        public static final int btnLED3Off=0x7f050005;
        public static final int btnLED3On=0x7f050004;
        public static final int btnLED4Off=0x7f050007;
        public static final int btnLED4On=0x7f050006;
    }
    public static final class layout {
        public static final int main=0x7f030000;
    }
    public static final class string {
        public static final int app_name=0x7f040000;
        public static final int led1off=0x7f040002;
        public static final int led1on=0x7f040001;
        public static final int led2off=0x7f040004;
        public static final int led2on=0x7f040003;
        public static final int led3off=0x7f040006;
        public static final int led3on=0x7f040005;
        public static final int led4off=0x7f040008;
        public static final int led4on=0x7f040007;
    }
}


android:layout_width="match_parent" 里为什么总是提示match_parent的类型不匹配
检举 | 2012-3-28 17:29 提问者: 泰迪男孩1 | 浏览次数:2928次
我来帮他解答
  2012-3-29 09:23 精彩回答
你用的SDK版本是多少? 
你的版本太低了要2.2才可以用match_paren,你只能用fill_parent
fill_parent -1 The view should be as big as its parent (minus padding). This constant is deprecated starting from API Level 8 and is replaced by match_parent.
match_parent -1 The view should be as big as its parent (minus padding). Introduced in API Level 8.
wrap_content -2 The view should be only big enough to enclose its content (plus padding).
2
| 评论(2)
 
向TA求助
回答者: 山芋不烫手 | 四级采纳率:22%
擅长领域: 电脑/网络 生活
参加的活动: 暂时没有参加的活动
提问者对回答的评价:
是,我现在把版本改了。呵呵
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值