Android 5.0程序运行报Service Intent must be explicit错误,原因是5.0的service必须显式调用

改成 Intent intent = new Intent(mContext, IService.class);

 或者Intent intent = new Intent();

      intent.setclass(xx.xx,xx.xx);

网上说的如下方式是不可行的:

Intent intent = new Intent("com.xx.xx.Service").setPackage("xx.xx.xx");

无法正常启动service!

posted on 2015-05-23 17:19  逸枫_1987  阅读(189)  评论(0编辑  收藏  举报