Call the setAction and setPackage methods at the same time when the intent is in life, so that the created intent is explicit
final Intent intent = new Intent();
intent.setAction("com.example.user.firstapp.FIRST_SERVICE");
intent.setPackage(this.getPackageName());
bindService(intent,conn,Service.BIND_AUTO_CREATE);
That is, after the action of the intent is set, the package name of the service must be set. This is a local call, so the package name can be obtained with the getPackageName() method.
Similar Posts:
- java.lang.IllegalArgumentException: Service Intent must be explicit: Intent { act=com.ba.cal
- [Solved] Android Studio Warning: Default Activity not found
- [Solved] The activity must be exported or contain an intent-filter
- [Five Method to Solve] android webpage err_unknown_url_scheme
- Android didi 16: a possibility of unable to start service intent
- Python: How to Modify AD Password
- The newly created androidmanifesto app is not indexable by Google search;
- The applet reports an error thirdscripterror DateValue is not defined;
- Android studio reports an error using startservice: IllegalStateException
- Session_start(): Cannot start session when headers already sent in [How to Solve]