android.content.ActivityNotFoundException: [英] 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.
我的AndroidManifest.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屋!