運(yùn)行時(shí)異常
用eclipse開發(fā)寫客戶端綁定service代碼時(shí),按照下面的寫法報(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ù)有沒有在清單文件里進(jìn)行注冊?