android application force close on this.startactivity(intent);
this is the source code i am using
@Override public boolean onOptionsItemSelected(MenuItem item) { 
        switch (item.getItemId()) {
        case R.id.AndroidLogo: 开发者_开发问答
            Intent intent = new Intent(this, AddUser.class);
          this.startActivity(intent);
        break;
        case R.id.AndroidText: 
            Intent intent2 = new Intent(this, SearchUser.class);
              this.startActivity(intent2);
        break;
        } 
        return true; 
        }
I think you have not mentioned the classes in menifest you wanted to call ;Use these permission lines to call another activity in activity tag
 < android:enabled="true" android:name="AddUser"/> 
for one first and for second class use another activity tag
<android:enabled="true" android:name="SearchUser"/>
 
         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论