android.content.ActivityNotFoundException: Unable to find explicit activity class 【安卓报错】
来源:互联网 发布:js 范围选择滑块插件 编辑:程序博客网 时间:2024/04/30 23:44
今天为安卓应用增加一个功能,严格来说仅仅是复制了一个原有的功能,从实体类、Activity、Fragment到Layout文件,都是原样复制然后稍加修改。完成之后运行,但是应用报错:
android.content.ActivityNotFoundException: Unable to find explicit activity class
Intent i = new Intent(getActivity(), MStationMgrActivity.class);startActivity(i);
应该是说 这个Intent i 找不到,也就是MStationMgrActivity类找不到,但这个类实际是在包里的,怎么回事?按理说各文件都复制了难道还缺了什么?
答案就是还缺了点东西,这里之所以提示MStationMgrActivity找不到,就是因为在AndroidManifest.xml中没有声明这个Activity。
然后在AndroidManifest.xml中声明这个Activity:
<span style="white-space:pre"></span><activity android:name=".MInstrumentMgrActivity" android:label="@string/instrument_mgr" > </activity> <activity android:name=".MStationMgrActivity" android:label="@string/station_mgr" > </activity>
然后重新运行,问题解决!
0 0
- android.content.ActivityNotFoundException: Unable to find explicit activity class 【安卓报错】
- android.content.ActivityNotFoundException: Unable to find explicit activity class(安卓报错)
- android.content.ActivityNotFoundException: Unable to find explicit activity class
- android.content.ActivityNotFoundException: Unable to find explicit activity class
- android.content.ActivityNotFoundException: Unable to find explicit activity class解决办法
- android.content.ActivityNotFoundException: Unable to find explicit activity
- Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class
- 【异常解决】android.content.ActivityNotFoundException: Unable to find explicit activity class
- android.content.ActivityNotFoundException: Unable to find explicit activity class {...}; have you de
- android.content.ActivityNotFoundException: Unable to find explicit activity class错误原因排查
- Android 异常解决 content.ActivityNotFoundException: Unable to find explicit activity class
- ActivityNotFoundException: Unable to find explicit activity class
- Android开发问题:ActivityNotFoundException: Unable to find explicit activity class
- Android开发Exception:ActivityNotFoundException: Unable to find explicit activity class
- Android错误:unable to find explicit activity class
- Unable to find explicit activity class
- Unable to find explicit activity class
- Unable to find explicit activity class
- 基于Spring、Hibernate的通用DAO层与Service层的实现
- 解决python3使用cx_Freeze打包成exe后不能运行
- 黑马程序员_java的反射机制
- linux netlink
- [Unity 笔记] 关于 Unity Forward Rendering
- android.content.ActivityNotFoundException: Unable to find explicit activity class 【安卓报错】
- 【cocos2d-x3.2游戏开发】 模态对话框拦截所有事件
- ubuntu 卸载程序
- Linux wext和nl80211接口简介
- javascript HTML函数
- ONVIF客户端搜索设备获取rtsp地址开发笔记(精华篇)
- HDU 2563 统计问题
- hdu 1280 前m大的数 (水题)
- 斐波那契数c++实现