java.lang.IllegalArgumentException: Service Intent must be explicit: Intent { act=com.exampler.backservice }
Before running very well, today into AAR embedded in the main project, suddenly reported an error as above
After asking, it turns out that the call to service intent has changed after Android 5.0. I have to use the display call, but I use the implicit one in my project, so I report an error. The modification is as follows
Intent intent = new Intent();
intent.setAction(Base.ACTION_BACK_SERVICE);
intent.setPackage(getPackageName()); //Add this line here to indicate compatibility after 5.0
this.startService(intent);
Working well, perfect
Similar Posts:
- Service Intent must be explicit solution: continued
- Android studio reports an error using startservice: IllegalStateException
- [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
- Git error: The following untracked working tree files would be overwritten by checkout
- The newly created androidmanifesto app is not indexable by Google search;
- Not targeting the latest versions of Android
- Kotlin Viewpager+fragment error: java.lang.IllegalStateException: Fragment already added