Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on Android Oreo: Not allowed to start service Intent app is in background #6

Open
freszu opened this issue Oct 20, 2017 · 0 comments

Comments

@freszu
Copy link

freszu commented Oct 20, 2017

Process: com.myapp.demo.debug, PID: 1176
java.lang.RuntimeException: Unable to create application com.myapp.application.App: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.myapp.demo.debug/com.nshmura.strictmodenotifier.LogWatchService }: app is in background uid UidRecord{2cde9eb u0a360 CEM  idle procs:1 seq(0,0,0)}
  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5794)
  at android.app.ActivityThread.-wrap1(Unknown Source:0)
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1661)
  at android.os.Handler.dispatchMessage(Handler.java:105)
  at android.os.Looper.loop(Looper.java:164)
  at android.app.ActivityThread.main(ActivityThread.java:6541)
  at java.lang.reflect.Method.invoke(Native Method)
  at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Caused by: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.myapp.demo.debug/com.nshmura.strictmodenotifier.LogWatchService }: app is in background uid UidRecord{2cde9eb u0a360 CEM  idle procs:1 seq(0,0,0)}
  at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1505)
  at android.app.ContextImpl.startService(ContextImpl.java:1461)
  at android.content.ContextWrapper.startService(ContextWrapper.java:644)
  at com.nshmura.strictmodenotifier.StrictModeNotifierInternals.startLogWatchService(StrictModeNotifierInternals.java:36)
  at com.nshmura.strictmodenotifier.StrictModeNotifier.install(StrictModeNotifier.java:14)
  at com.nshmura.strictmodenotifier.StrictModeNotifier.install(StrictModeNotifier.java:8)
  at com.myapp.application.DebugMetricsHelper.init(DebugMetricsHelper.kt:50)
  at com.myapp.application.App.onCreate(App.kt:26)
  at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1118)
  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5791)
  at android.app.ActivityThread.-wrap1(Unknown Source:0) 
  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1661) 
  at android.os.Handler.dispatchMessage(Handler.java:105) 
  at android.os.Looper.loop(Looper.java:164) 
  at android.app.ActivityThread.main(ActivityThread.java:6541) 
  at java.lang.reflect.Method.invoke(Native Method) 
  at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) 
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767) 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant