把androidmanifest.xml和main.xml都贴上来看下~
解决方案 »
- 安卓4关机画面不出现怎么办?
- handler和ProgressDialog这种写法貌似正确,但是我隐约觉得有错误
- 切换到另一个activity时,无法显示自己在此activity中定义的控件
- 关于取到GPS经纬度后在GoogleMap上定点偏差的问题。
- sqlite不能循环删除多条记录吗?
- android如何在不插卡的情况下获取手机信号
- ComponentName怎么用啊?
- 【讨论】大家安卓手机上还缺少什么类型的APP
- 基于open street map的地图引擎,支持离线地图。
- 基于Android的室内定位导航系统 源代码
- [Android] 怎样方便的修改系统源代码
- 如何获取活动进程的列表?
我把楼主的代码拷贝后,自己完善了main.xml后,运行正常。建议楼主重新建一个工程试试。
我的main.xml如下
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
android:id="@+id/text"
/>
<RadioGroup
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/RadGroup"
>
<RadioButton
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="On"
android:id="@+id/Rad1"
/>
<RadioButton
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Off"
android:id="@+id/Rad2"
/>
</RadioGroup>
</LinearLayout>