Android ListView, start new activity

安稳与你 提交于 2019-12-02 13:19:43

Make sure you are adding the activity to the Android manifest In your manifest file you should add the activity like this:

<activity android:name=".Lars"/>

make sure to do this for each Intent and activity you plan to use.

You are passing an Activity as the argument to the startActivity() function

startActivity(MenuActivity.class)

Instead you should be passing it an Intent like this

Intent myIntent = new Intent(Videos.this, MenuActivity.class);
startActivity(myIntent);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!