public class HerodisplayActivity extends Activity
{
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.about);
}
}
public class AboutActivity extends Activity
{
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.about);
}
}
两个Activity除了名字不一样,其它代码一样,而且也都是简单代码,为什么第一个在使用的时候出错崩溃,第二个就可以呢
------解决方案--------------------
你没在XML注册这个Activity吧
------解决方案--------------------
需要在AndroidManifest.xml注册这个Activity
如<activity
android:name="otherActivity"
android:label="@string/other"/>
------解决方案--------------------
呵呵,没注册