ActivityNotFoundException?

后端 未结 10 765
滥情空心
滥情空心 2020-12-01 14:25

I am getting an ActivityNotFoundException in the following code:

Main.java

Intent intent = new Intent();
     intent.setAction(\"com.tes         


        
10条回答
  •  天命终不由人
    2020-12-01 15:05

    To launch an activity by a string definition, use:

    Intent intent = new Intent();
    intent.setComponent(
            new ComponentName("com.app", "com.app.activity.TheActivity"));
    startActivity(intent);
    

提交回复
热议问题