運(yùn)行時(shí)異常
用eclipse開(kāi)發(fā)寫(xiě)客戶端綁定service代碼時(shí),按照下面的寫(xiě)法報(bào)錯(cuò),
Intent service = new Intent();
service.setComponent(new ComponentName("tarena.xf.cn.ipc_server", "tarena.xf.cn.ipc_server.MyService"));
java.lang.RuntimeException: Unable to start activity ComponentInfo{tarena.xf.cn.ipc_client/tarena.xf.cn.ipc_client.MainActivity}: java.lang.SecurityException: Not allowed to bind to service Intent { cmp=tarena.xf.cn.ipc_server/.MyService }
2017-06-19
服務(wù)有沒(méi)有在清單文件里進(jìn)行注冊(cè)?