android Unable to instantiate service
来源:互联网 发布:sql server 2012 64位 编辑:程序博客网 时间:2024/05/19 00:40
今天我想启动android 一个Service服务时总是报错:
05-04 14:36:22.680: E/AndroidRuntime(19580): java.lang.RuntimeException: Unable to instantiate servicecom.xinhuadictionary.MyService: java.lang.ClassNotFoundException: com.xinhuadictionary.MyService in loader dalvik.system.PathClassLoader[/mnt/asec/com.xinhuadictionary-1/pkg.apk]
找了很久错误原因:终于发现原来是注册Service的时候出现错误。
<service
android:name=".MyService" //原来是这样的
android:exported="false">
<intent-filter >
<action android:name="com.xinhuadict.activity.MyService"/>
</intent-filter>
</service>
后来改成这样就OK了。。。
<service
android:name="com.xinhuadict.activity.MyService" //即加上包名
android:exported="false">
<intent-filter >
<action android:name="com.xinhuadict.activity.MyService"/>
</intent-filter>
</service>
- android Unable to instantiate service
- Android Unable to instantiate fragment
- Unable to instantiate service com.baidu.android.pushservice.PushService: java.lang.ClassNotFoundExc
- android 异常 Unable to instantiate activity ComponentInfo
- Android报unable to instantiate application
- Android - 错误:Unable to instantiate application
- Android - 错误:Unable to instantiate application
- Android报unable to instantiate application
- Android "Unable to instantiate fragment"解决方案
- Android Unable to instantiate activity ComponentInfo...
- IntentService报Unable to instantiate service 错误的解决方法
- Unable to instantiate Action
- Unable to instantiate Action
- Unable to instantiate Action
- Unable to instantiate Action
- Unable to instantiate activity
- Unable to instantiate activity
- Unable to instantiate activit
- jsp自定义标签
- H.26L中的Access unit结构分析
- 数据库3范式
- 基础知识
- c 最大堆排序
- android Unable to instantiate service
- PHP日期格式转时间戳
- 用java Swing 写的计时器
- SQL SERVER性能分析--死锁检测数据库阻塞语句
- 非阻塞connect
- w3school在线学习
- AsyncSocket详解 .
- Samba 服务使用的端口和协议
- winusb —— 不再为你的usb设备编写驱动