这种情况下,一般都是在Aty1的create里报了异常。你没有把那个代码贴出来
解决方案 »
- android读写串口的权限问题
- activity退出动画
- setResult(RESULT_OK,intent)回传不了值,为什么?总是null
- 第一次启动初始化GridView对象,如何设置某一项的背景色?
- Android GPS小程序,真机上不工作....
- 小白请教问题多个ACTIVITY之间的跳转调试
- 系统软键盘的显示
- listview的ID为什么必须是"@+id/android:list"
- 请问, android下的应用程序中, 想在以下语句中加时间输出信息, 如何加呢? (不知函数名称)
- 如何获取安卓手机支持的语言列表信息?
- 安卓平台基于SIP协议实现注册,聊天功能
- 大家的android环境都是怎么下载配置的?官网链接老断,下不了包呀!!
package com.example.hello;import android.app.Activity;
import android.os.Bundle;public class Aty1 extends Activity {@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.aty1);
}
}这是Aty1.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" > <TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="aty1"
android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout>
package com.example.hello;import android.app.Activity;
import android.os.Bundle;public class Aty1 extends Activity {@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.aty1);
}
}这是Aty1.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" > <TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="aty1"
android:textAppearance="?android:attr/textAppearanceLarge" />
</LinearLayout>