android.content.ActivityNotFoundException:

前端 未结 24 2090
一生所求
一生所求 2020-11-22 10:38

I am getting this exception while I am trying to call an activity from another one. The complete exception is

android.content.ActivityNotFoundExcept

24条回答
  •  萌比男神i
    2020-11-22 11:14

    intent.setClass takes parameters as "Package Context" and "Class". an example would be:

    intent.setClass(CurrentActivity.this, TargetActivity.class);
    

    also you need to check if the activity is registered in manifest file.

提交回复
热议问题