How do I resolve theNotFoundException?

I’m getting an ActivityNotFoundException in my Android Application.. Here’s the code snippet I have put to call the activity :

Intent i = new Intent();
i.putExtra("NAME", username.getText().toString());
i.setClassName(getPackageName(), SecondActivity.class.getSimpleName());

my AndroidManifest.xml looks like this


When I execute the code snippet with the intent, I get the following exception.

E/AndroidRuntime(731): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.rangde/WelcomeActivity}; have you declared this activity in your AndroidManifest.xml?

Can someone tell me what I’m doing wrong?

Hello, buddy!稿源:Hello, buddy! (源链) | 关于 | 阅读提示

本站遵循[CC BY-NC-SA 4.0]。如您有版权、意见投诉等问题,请通过eMail联系我们处理。
酷辣虫 » 移动开发 » How do I resolve theNotFoundException?

喜欢 (0)or分享给?

专业 x 专注 x 聚合 x 分享 CC BY-NC-SA 4.0

使用声明 | 英豪名录