调用startService会生成NULL指针异常

时间:2012-03-22 20:08:17

标签: android exception android-intent

我从客户端调用startService(intent)到服务。此调用会创建一个例外:

final Intent intent = new Intent("com.L.LService");
final ComponentName cn = new ComponentName("com.L","com.L.LService");
intent.setComponent(cn);
intent.putExtra("intID", "appR");
intent.putExtra("aid", AppID);

try {
  startService(intent);

} catch (Exception e) {

  e.printStacktrace();
}

有什么想法吗?

0 个答案:

没有答案