倩倩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的,自己检查下

    评论

报告相同问题?

悬赏问题

  • ¥15 python的qt5界面
  • ¥15 无线电能传输系统MATLAB仿真问题
  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100