aidl "Service Intent must be explicit"

     Android 5.0以后,Aidl绑定都需要显示调用,如果还是隐显调用,发生异常: java.lang.IllegalArgumentException: Service Intent must be explicit。

     例如:

  1. ntent intent = new Intent("android.intent.action.AIDLService");  
  2.                 //for android 5.0 and later, service intent must be explicit  
  3.                 intent.setPackage("com.example.android.aidlserver");  
  4.                 bindService(intent, conn, Context.BIND_AUTO_CREATE);  

你可能感兴趣的:(Android)