Unable to start Service Intent

前端 未结 6 1007
被撕碎了的回忆
被撕碎了的回忆 2020-11-27 15:05

I have a service class. I have exported this class to jar and I have embed the jar in my client app.

When needed, I call the service class. When I try to do this, I

6条回答
  •  余生分开走
    2020-11-27 15:33

    I hope I can help someone with this info as well: I moved my service class into another package and I fixed the references. The project was perfectly fine, BUT the service class could not be found by the activity.

    By watching the log in logcat I noticed the warning about the issue: the activity could not find the service class, but the funny thing was that the package was incorrect, it contained a "/" char. The compiler was looking for

    com.something./service.MyService

    instead of

    com.something.service.MyService

    I moved the service class out from the package and back in and everything worked just fine.

提交回复
热议问题