0

I have a test case for test the service , when update the Android SDK to 5.+ ,Then I got this exception : Service intent must be explicit , and i also done this (set the intent ComponentName make the implicit to explicit)

Reference URL:http://blog.android-develop.com/2014/10/android-l-api-21-javalangillegalargumen.html

Now i still got this exception and i don't know why , i have tried so many ways just didn't work. so anyone else encounter this situation ?

Peter
  • 1
  • This is pretty clearly described. Please post the code you are using to test the start the service, also the logcat with error message and stack trace. – David Wasser Feb 04 '15 at 10:04
  • @DavidWasser I wish i could but i can't , because the security rules in my company. But the code is sample just like this {intent service = new Intent("com.sony.xxxxx"); getinstrumentation().getContext().bindService(new Intent(createExplicitFromImplicitIntent(service))) ; The createExplicitFromImplicitIntent() function is from the Reference URL which i post in my described above . – Peter Feb 05 '15 at 05:54
  • This makes no sense. Please post the code that is used (not the test code) in your application to bind to the `Service`. You can anonymize it if necessary. Is the application actually binding to the service using an IMPLICIT or EXPLICIT `Intent`? Also post the `` description from the manifest (which you can also anonymize). – David Wasser Feb 05 '15 at 08:07
  • @DavidWasser Sorry for reply so late , and this issue had fixed. The root case is the application using an IMPLICIT intent to binding to the service , but this code is hiding too deep so i'm ignored this before. And thank you any way . – Peter Mar 04 '15 at 08:50

0 Answers0