android.content.ActivityNotFoundException: [英] android.content.ActivityNotFoundException:

查看:191
本文介绍了android.content.ActivityNotFoundException:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到此异常,当我试图调用从另一个活动。完整的例外是

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

android.content.ActivityNotFoundException:无法找到明确的活动类{com.xy / com.xyclass};

android.content.ActivityNotFoundException:Unable to find explicit activity class {com.x.y/com.x.y.class};

我在做一个 intent.setClass(com.xy,​​com.xyclassName),其中类名是我的活动类的名称, com.xy 是它驻留在包中。

I am doing an intent.setClass("com.x.y","com.x.y.className") where className is the name of my activity class and com.x.y is the package it resides in.

我的Andr​​oidManifest.xml中有如下内容:

My AndroidManifest.xml has the following content:

<activity android:name="com.x.y.className" android:label="@string/app_name">

我缺少什么?

Am I missing anything?

推荐答案

也许你需要检查你加入了一个新的活动到manifest.xml文件

Maybe you need to check that you added the new activity to the manifest.xml file

这篇关于android.content.ActivityNotFoundException:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆