How can I start MAIN activity with the help of ?

后端 未结 3 684
时光说笑
时光说笑 2020-12-07 03:14

When I declare my main activity in this maner:



        
3条回答
  •  我在风中等你
    2020-12-07 03:51

    Your class name isn't com.package.name.MyActivity, it's com.package.name.general.MyActivity.

    An easy way to avoid this mistake is to create your new Intent using a class instead of a package name. You can use auto-complete to fill in the right class.

    You say you don't want to create the Intent by specifying the class. I wonder why not -- I think it's a good way to go.

提交回复
热议问题