倩倩qian 2016-03-14 06:59 采纳率: 0%
浏览 1685
已结题

为甚RadioButton在红米手机上不能跑

报错:Error inflating class android.widget.RadioButton
把这段删了就能跑

 <RadioGroup
            android:id="@+id/rg_01"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="30dp"
            android:orientation="horizontal" >

            <RadioButton
                android:id="@+id/rb_01"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_margin="5dp"
                android:checked="true"
                android:text="@string/rb_boy" />

            <RadioButton
                android:id="@+id/rb_02"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_margin="5dp"
                android:text="@string/rb_girl" />
        </RadioGroup>
  • 写回答

2条回答

  • zhouxiongfei 2016-03-14 07:52
    关注

    xml没什么问题啊,你有没有在代码中调用与操作过对应的控件,如果有,并且在在其他的机型上是正常的,那么检查下版本是否一致,如果不一致可能是方法的问题,有些低版本的方法是有bug的,自己检查下

    评论

报告相同问题?

悬赏问题

  • ¥50 comsol稳态求解器 找不到解,奇异矩阵有1个空方程返回的解不收敛。没有返回所有参数步长;pid控制
  • ¥15 怎么让wx群机器人发送音乐
  • ¥15 fesafe材料库问题
  • ¥35 beats蓝牙耳机怎么查看日志
  • ¥15 Fluent齿轮搅油
  • ¥15 八爪鱼爬数据为什么自己停了
  • ¥15 交替优化波束形成和ris反射角使保密速率最大化
  • ¥15 树莓派与pix飞控通信
  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功