Error Messages:
Process: com.example.provider, PID: 31612 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.provider/com.example.provider.MainActivity}: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.example.provider/.MyService }: app is in background uid UidRecord{9c06385 u0a69 TPSL idle change:idle|cached procs:1 seq(0,0,0)} at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3270) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) Caused by: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.example.provider/.MyService }: app is in background uid UidRecord{9c06385 u0a69 TPSL idle change:idle|cached procs:1 seq(0,0,0)} at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1616) at android.app.ContextImpl.startService(ContextImpl.java:1571) at android.content.ContextWrapper.startService(ContextWrapper.java:669) at android.content.ContextWrapper.startService(ContextWrapper.java:669) at com.example.provider.MainActivity.onCreate(MainActivity.java:15) at android.app.Activity.performCreate(Activity.java:7817) at android.app.Activity.performCreate(Activity.java:7806) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1306) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3245)
Solution:
After Android 8.0, background processes are no longer allowed to start services directly through the startService method.:
startForegroundService
Read More:
- ROS Gazabo Error: [ERROR]: No p gain specified for pid. Namespace: /gazebo_ros_control/pid_gains/ ×65374;
- Redis Error: HandleServiceCommands: system error caught. error code=1056, message = StartService failed:
- [Solved] RuntimeError: An attempt has been made to start a new process before the current process…
- [Solved] truffle Error: Cannot find module ‘truffle-hdwallet-provider‘
- [Solved] Android DataBinding Error: java.lang.ArrayIndexOutOfBoundsException: length=2; index=2 fragment Changes to Fragm
- SpringBoot uses MyBatis error: Error invoking SqlProvider method (tk.mybatis.mapper.provider.base.BaseInsertProvider.dynamicSQL)
- [Solved] Consul Error: github.com/boltdb/bolt github.com/boltdb/bolt github.com/hashicorp/raft-boltdb
- [Solved] Android Studio APK install Error: INSTALL_FAILED_CONFLICTING_PROVIDER
- [Solved] MAC Nginx Error: ginx.pid“ failed (2: No such file or directory)
- [Solved] Verdi Crash Error: ICE default IO error handler doing an exit(), pid = 3475, errno = 32
- MySQL error: starting MySQL… The server quit without updating PID file
- [Solved] Manifest merger failed: android:exported needs to be explicitly specified for element <activity#com
- Docker run Error: container_linux.go:235: starting container process caused “process_linux.go:258: appl
- How to Solve Error inflating class android.support.design.widget.FloatingActionButton
- XML read process error: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1] Message: Content not allowed in preamble
- [Solved] Execution failed for task ‘:app:processDebugResources‘. > A failure occurred while executing com.and
- [Solved] Mybatis-plus Error: mybatisplus-Invalid bound statement (not found): com.integration.dao.ApiDao.getList
- com.netflix.zuul.exception.zuulexception Timeout (Fixed)
- ### Error building SqlSession. ### The error may exist in com/itrs/mapper/UserMapper.xml ### Cause:
- [Solved] Error building SqlSession. ### The error may exist in com/itrs/mapper/OrderMapper.xml